杭电ACM
小弟想知道为什么循环周期是49呢,
Anumbersequenceisdefinedasfollows:
f(1)=1,f(2)=1,f(n)=(A*f(n-1)+B*f(n-2))mod7.
GivenA,B,andn,youaretocalculatethevalueoff(n).
Input
Theinputconsistsofmultipletestcases.Eachtestcasecontains3integersA,Bandnonasingleline(1