#include <cstdlib>
#include <iostream>
using namespace std;
int main()
{
int t, a, b, c, d, e;
while (cin >> t)
{
for (int s = 1; s <= t ; s++)
{
cin >> a >> b >> c >> d ;
if ( b/a == c/b && c/b == d/c)
{
e = d*d/c;
cout << a << " " << b << " " << c << " " << d << " " << e << endl;
}
else if ( b-a == c-b && c-b == d-c)
{
e = d+d-c;
cout << a << " " << b << " " << c << " " << d << " " << e << endl;
}
}
}
return 0;
}
+++歡迎討論+++
小弟是113管院畢業,出社會近一年,十分後悔沒有學好寫程式,目前自學C++中。
+++歡迎討論+++