摘要: 题意:Number SequenceProblem Description hdu1005A 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).InputThe input consists of multiple test cases. Each test case contains 3 integers A, B and n 阅读全文
posted @ 2011-05-21 10:56 tonyspace 阅读(276) 评论(0) 推荐(1) 编辑