| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 56858 | 尹翊泽 | 找规律填数字 | C++ | Wrong Answer | 0 | 0 MS | 256 KB | 610 | 2022-08-03 15:24:55 |
#include<bits/stdc++.h> using namespace std; long long a,b,c,d,e,f,t,l; int main(){ while(cin>>a&&a){ cin>>b>>c>>d>>e; if(e-d==d-c&&d-c==c-b&&c-b==b-a){ l=e-d; if(l==1) cout<<e+1<<" "<<e+2<<" "<<e+3<<" "<<e+4<<" "<<e+5<<" "; else cout<<e+l<<" "<<e+2*l<<" "<<e+3*l<<" "<<e+4*l<<" "<<e+5*l<<" "; } if(e/d==d/c&&d/c==c/b&&c/b==b/a){ l=b/a; for(int i=1;i<=5;i++){ cout<<e*l<<" "; e*=l; } cout<<endl; } if(e==d+c&&d==c+b&&c==b+a){ t=d; for(int i=1;i<=5;i++){ e+=t; cout<<e<<" "; t=e-t; } cout<<endl; } } return 0; }