ZOJ 2060----Fibonacci Again
生活随笔
收集整理的這篇文章主要介紹了
ZOJ 2060----Fibonacci Again
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
沒什么好說的,就是要求斐波那契,問該數是否能夠被三整除,寫出了答案的個位便可發現規律。code:
#include <iostream>
using namespace std;
int main() {
int n;
while (cin>>n) {
if ((n - 2) % 4!=0)
cout<<"no"<<endl;
else
cout<<"yes"<<endl;
}
}
#include <iostream>
using namespace std;
int main() {
int n;
while (cin>>n) {
if ((n - 2) % 4!=0)
cout<<"no"<<endl;
else
cout<<"yes"<<endl;
}
}
總結
以上是生活随笔為你收集整理的ZOJ 2060----Fibonacci Again的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 子宫内膜息肉引起不孕
- 下一篇: ZOJ 1295——Reverse Te