#20352:


yp10870930 (123)

學校 : 臺北市私立延平高級中學
編號 : 105817
來源 : [203.72.178.252]
最後登入時間 :
2020-01-09 11:02:21
a005. Eva 的回家作業 -- POJ | From: [203.72.178.252] | 發表日期 : 2020-01-09 11:25

#include <iostream>
using namespace std;
int main() {
 int a, b, c, d, t;
  cin >> t;
  while (t-->0) {
   cin >> a >> b >> c >> d;
   if (d - c == c - b )  cout << a <<" " << b<<" " << c<<" " << d <<" " << b - a + d<<"\n";
   else cout << a<<" " << b<<" " << c<<" " << d<<" " << d * b<<"\n";
 }
}
 
ZeroJudge Forum