您的位置:首页 > 大数据 > 人工智能

hdu 1021 Fibonacci Again 递推数列模周期

2013-07-09 17:13 447 查看
题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=1021

说明 :题目很水

但是有一个重要结论,只要是递推数列,一定是模周期数列 (可以用抽屉原理证明)

#include<iostream>
using namespace std;
int main()
{
int n;
while(cin>>n)
{
if(n%8==2||n%8==6)  cout<<"yes"<<endl;
else cout<<"no"<<endl;
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: