摘要:
水题~Problem DescriptionA simple mathematical formula for e iswhere n is allowed to go to infinity. This can actually yield very accurate approximations of e using relatively small values of n.OutputOutput the approximations of e generated by the above formula for the values of n from 0 to 9. The begi 阅读全文
posted @ 2012-02-25 20:57
zrq495
阅读(210)
评论(0)
推荐(0)
摘要:
Problem DescriptionA 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 on a single line (1 <= 阅读全文
posted @ 2012-02-25 20:39
zrq495
阅读(177)
评论(0)
推荐(0)
浙公网安备 33010602011771号