#15450: 要怎麼改才不會逾時?


071009@hchs.kh.edu.tw (張簡雲翔)


#include<iostream>
using namespace std;
int main()
{
int a,b,c,d,e,t;
cin>>t;
while((0<=t)and(t<=20))
{
cin>>a>>b>>c>>d;
if(b-a==c-b)
{
e=b-a+d;
}
else
{
e=b/a*d;
}
cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<endl;
}
return 0;
}