#include <iostream>
using namespace std;
int main (){
int a, b, c, d,e;
while(cin >> a>> b>> c>> d){
if(b-a == c-b == d-c){
e=d+d-c;
cout<<a, b, c , d, e<<endl;
}
elseif(b/a==c/b==d/c){
e=d*(d/c);
cout<<a, b, c , d, e<<endl;
}
else{
cout<<"wrong"<<endl;
}
return 0;
}
#include
using namespace std;
int main (){
int a, b, c, d,e;
while(cin >> a>> b>> c>> d){
if(b-a == c-b == d-c){
e=d+d-c;
cout<<a, b, c , d, e<<endl;
}
elseif(b/a==c/b==d/c){
e=d*(d/c);
cout<<a, b, c , d, e<<endl;
}
else{
cout<<"wrong"<<endl;
}
return 0;
}
沒事了,解出來了