[暖手][学习阶段-各路杂题][HDU-1005]Number Sequence
Problem Description
A number sequence is defined as follows:
f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7.
Given A, B, and n, you are to calculate the value of f(n).
原创
2015-01-27 23:15:03 ·
391 阅读 ·
0 评论