2019省赛A组第2题
#include<bits/stdc++.h> using namespace std; int main() { int first=1,second=1,third=1; for(int i=4;i<=20190324;i++){ int temp=(first+second+third)%10000; first=second; second=third; third=temp; } cout<<third; return 0; }
这道题这个求余挺好的。
#include<bits/stdc++.h> using namespace std; int main() { int first=1,second=1,third=1; for(int i=4;i<=20190324;i++){ int temp=(first+second+third)%10000; first=second; second=third; third=temp; } cout<<third; return 0; }
这道题这个求余挺好的。