摘要:
Colossal Fibonacci Numbers! UVA - 11582 The i’th Fibonacci number f(i) is recursively defined in the following way: • f(0) = 0 and f(1) = 1 • f(i + 2) 阅读全文
posted @ 2017-10-07 19:12
ikefire
阅读(304)
评论(0)
推荐(0)
摘要:
1.大整数取模 把大整数写成“自左向右”的形式:1234=((1*10+2)*10+3)*10+4;然后逐步取模。 eg:n<=10100,m<=1018。但是要注意乘法溢出的问题。 代码: 为了解决上面乘法溢出的问题,可以采用如下方法: 2.F快速幂 大致意思是给出三个数n,m,p。他们的范围是0 阅读全文
posted @ 2017-10-07 14:54
ikefire
阅读(331)
评论(0)
推荐(0)

浙公网安备 33010602011771号