2060

所属分类:其他小程序
开发工具:C/C++
文件大小:471KB
下载次数:3
上传日期:2006-04-25 15:07:28
上 传 者rcponder
说明:  判断另一种斐波那契系列是否是3 的倍数问题 该题如果用递归求出F(n),然后判 断将会超时。 注意到F(n) = F(n-1) + F(n-2)根据和的模等于模的和。 即有F(n)%3=(F(n-1)%3+F(n-2)%3)%3 F(0)%3=1,F(1)%3=2 计算F(n)%3 : 1,2,0,2,2,1,0,1,1,2,0,2,2,1…………… 可以看出F(n)%3 以1,2,0,2,2,1,0,1, 重复出现 F(n)%3=0 即F(n)是3 的倍数此时的n 等于8k+2 或8k+6
(Fibonacci Series 3 is whether the multiplier issue that if the calculated using recursive F (n), The judgment will then overtime. Notes F (n) = F (n-1) F (n-2) and the modulus and the same model. That is, F (n) = 3% (F (n-1)% F 3 (n-2)% 3)% 3 F (0%) 3 = 1, F (1)% 2 3 = calculated F (n)% 3 : 1,2,0,2,2,1,0,1,1,2,0. 2,2,1 ... ... ... can be seen F (n) 3% to 1,2,0,2,2,1,0,1, repeated F (n) = 0% 3 F (n) 3 is a multiple of n time to 8k or 8k 6 2)

文件列表:
2060.cpp (255, 2004-12-27)
2060.dsp (3377, 2006-04-25)
2060.dsw (533, 2006-04-25)
2060.ncb (41984, 2006-04-25)
2060.opt (48640, 2006-04-25)
2060.plg (734, 2006-04-25)
Debug (0, 2006-04-25)
Debug\1733.exe (188501, 2006-04-25)
Debug\1733.ilk (229948, 2006-04-25)
Debug\1733.obj (6727, 2006-04-25)
Debug\1733.pch (250500, 2006-04-25)
Debug\1733.pdb (394240, 2006-04-25)
Debug\2060.exe (192597, 2006-04-25)
Debug\2060.ilk (233508, 2006-04-25)
Debug\2060.obj (6840, 2006-04-25)
Debug\2060.pch (244376, 2006-04-25)
Debug\2060.pdb (402432, 2006-04-25)
Debug\vc60.idb (41984, 2006-04-25)
Debug\vc60.pdb (61440, 2006-04-25)

近期下载者

相关文件


收藏者