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

1021 Fibonacci Again

2016-08-19 12:27 344 查看
#include<iostream>
using namespace std;

int f[1000000];
int main()
{
f[0] = 7, f[1] = 11;
for (int n = 2; n < 1000000; ++n)
{
f
= f[n - 1] + f[n - 2];
}
int n;
while (cin >> n)
{
if (f
% 3 == 0)
cout << "yes" << endl;
else cout << "no" << endl;
}
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: