#15764:


tsai1122 (unknown)

學校 : 新北市立板橋高級中學
編號 : 84458
來源 : [203.64.161.187]
最後登入時間 :
2019-01-23 09:00:10
a005. Eva 的回家作業 -- POJ | From: [36.224.235.92] | 發表日期 : 2018-10-27 17:30

#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