hd 1021 Fibonacci Again 规律对4取余为2 则yes
来源:互联网 发布:二维旋转矩阵的推导 编辑:程序博客网 时间:2024/06/05 16:56
Fibonacci Again
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 36326 Accepted Submission(s): 17543
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.
Print the word "no" if not.
Sample Input
012345
Sample Output
nonoyesnonono
Author
Leojay
Recommend
JGShining | We have carefully selected several similar problems for you: 1061 1019 1108 1071 1049
#include<stdio.h>
int main()
{
int n;
while(scanf("%d",&n)!=EOF)
{
if(n%4==2)
printf("yes\n");
else
printf("no\n");
}
return 0;
}
0 0
- hd 1021 Fibonacci Again 规律对4取余为2 则yes
- hd 1061 Rightmost Digit 规律21 一循环 对20取余
- HDU-1021-Fibonacci Again ( 找规律 + Fibonacci )
- 1407211704-hd-Fibonacci Again
- hdu 1021 Fibonacci Again(斐波那契数列,取余)
- hdoj 1021||nbut 1013 Fibonacci Again (规律)
- hdu 1021 Fibonacci Again 找规律
- hdu 1021 Fibonacci Again(找规律)
- hdu 1021 Fibonacci Again【找规律】
- HDU 1021 Fibonacci Again(找规律)
- HDU 1021 Fibonacci Again 水题 找规律
- HDOJ 1021 Fibonacci Again(找规律)
- Hdoj 1021 Fibonacci Again (找规律)
- Fibonacci数列第n项对10007取余
- hdu_1021 fibonacci again (找规律)
- 1021/ Fibonacci Again 同余运算关系 + 打表 水题
- 【暑假测试2】A HDU 1021 Fibonacci Again(水:递推、找规律)
- iOS 取随机数 对4取余
- Oracle 数据库中批量读取图片
- hdu-4864 Task 2014多校联赛第一场 贪心
- windows下安装jmeter
- linux驱动开发重点关注内容--摘自《嵌入式Linux驱动模板精讲与项目实践》
- asii和unicode格式字符串之间的相互转换
- hd 1021 Fibonacci Again 规律对4取余为2 则yes
- 速配游戏
- JBOSS EAP 6 系列七 JPA/hibernate
- leetcode 虐我篇之(九)Roman to Integer
- hdu 4891 模拟
- 学生信息管理系统的收获
- 几篇关于架构的博客
- Leetcode--ZigZag Conversion
- [LeetCode] Binary Tree Inorder Traversal [41]