提交时间:2022-08-03 17:59:26
运行 ID: 57077
#include<bits/stdc++.h> using namespace std; const int N=10010; int ff[5001]={0}; int a,b,c,d,e; int main(){ while(1){ cin>>a>>b>>c>>d>>e; if(a==0&&b==0&&c==0&&d==0&&e==0) break; if(((b-a)==(c-b))&&((c-b)==(d-c))&&((d-c)==(e-d))){ cout<<(e+(b-a))<<" "<<(e+2*(b-a))<<" "<<(e+3*(b-a))<<" "<<(e+4*(b-a))<<" "<<(e+5*(b-a))<<endl; continue; } if(((b/a)==(c/b))&&((c/b)==(d/c))&&((d/c)==(e/d))){ cout<<(e*(b/a))<<" "<<(e*(b/a)*(b/a))<<" "<<(e*(b/a)*(b/a)*(b/a))<<" "<<(e*(b/a)*(b/a)*(b/a)*(b/a))<<" "<<(e*(b/a)*(b/a)*(b/a)*(b/a)*(b/a))<<endl; continue; } if(((b+a)==c)&&((c+b)==e)&&((d+c)==e)){ cout<<(d+e)<<" "<<(d+e*2)<<" "<<(d*2+e*3)<<" "<<(d*3+e*5)<<" "<<(d*5+e*8)<<endl; continue; } } return 0; }