标题:Fibonacci 问题
取消只看楼主
利剑出鞘
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2008-5-18
 问题点数:0 回复次数:0 
Fibonacci 问题
Problem Description
There are another kind of Fibonacci numbers: F(0) = 7, F(1) = 11, F(n) = F(n-1) + F(n-2) (n>=2).

Input
Input consists of a sequence of lines, each containing an integer n. (n < 1,000,000).

Output
Print the word "yes" if 3 divide evenly into F(n).

Print the word "no" if not.

Sample Input
0
1
2
3
4
5

Sample Output
no
no
yes
no
no
no
搜索更多相关主题的帖子: Fibonacci 
2008-09-29 17:06



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-235805-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.583934 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved