提交时间:2022-08-03 15:42:33

运行 ID: 56878

#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){ l=e-d; if(l==1) cout<<e+1<<" "<<e+2<<" "<<e+3<<" "<<e+4<<" "<<e+5<<" "<<endl; else cout<<e+l<<" "<<e+2*l<<" "<<e+3*l<<" "<<e+4*l<<" "<<e+5*l<<" "<<endl; } 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; }