第一看上去是个打表,先写了再说(虽然我感觉应该不是这样。)然后特么过了。。又是水题
#include <iostream>
#include <string.h>
using namespace std ;
typedef long long ll;
const int MAX =1000050;
ll f[MAX]={7,11};
int main(){
for(int i = 2 ; i <= 1000000 ; i++){
f[i]=f[i-1]%3+f[i-2]%3;
}
int n ;
while(cin>>n){
if(f[n]%3==0) cout<<"yes"<<endl;
else cout <<"no"<<endl;
}
return 0;
}