提交时间:2022-08-03 15:07:34

运行 ID: 56831

#include<bits/stdc++.h> using namespace std; int a,b,c,d,e,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=b-a; for(int i=1;i<=5;i++){ cout<<e+l<<" "; e+=l; } cout<<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; }