#450B

codeforces 450B Jzzhu and Sequences

题目链接:http://codeforces.com/contest/450/problem/B解题思路:找循环节。注意当f[i]是负数的时候一定要把他加上mod直到>0为止;e:-3%4==1;#include<iostream>usingnamespacestd;constintmod=1e9+7...