Fibonacci Again
2015-06-08 13:35
357 查看
Time Limit: 2000/1000 MS(Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 43312 Accepted Submission(s): 20674 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 |
main()
{
int a,b,i,j;
while(scanf("%d",&a)!=EOF)
{
if((a-2)%4==0)
printf("yes\n");
else printf("no\n");
}
return 0;
}
相关文章推荐
- SDUST - Training F HDU2199 方程求解,二分查找,精度控制
- Cain (Arp)获取局域网http及邮箱协议密码
- 如何在 Rails 中使用 Webpack
- Failed to connect to remote VM. Connection refused. Connection refused: connect.
- Software caused connection abort: recv failed 错误介绍
- int main(int argc,char* argv[])详解
- vs无法识别的外部符号 main
- LeetCode:Contains Duplicate II
- No space left on device svn: Commit failed (details follow): svn: Can't flush file '/srv/tsocsvn/ts
- Train Problem II
- AIX UNIX 系统管理、维护与高可用集群建设——数据库结构设计
- LeetCode:Contains Duplicate
- ROOT.SH OR ACFSROOT INSTALL, FAILS: ACFS-9109: SLES11 SP3
- Climbing Stairs
- 用opencv自带的traincascade.exe训练给予haar特征和LBP特征的分类器
- ssh: Could not resolve hostname you: Temporary failure in name resolution
- Contains Duplicate II ——LeetCode
- 丸美集团TurboMail邮件系统最新上线
- HDU 1023 Train Problem II (卡特兰数,经典)
- POJ - 1422 Air Raid 二分图最大匹配