#21294:


brian0816.huang@gmail.com (stone)

學校 : 國立中正大學
編號 : 118024
來源 : [118.168.184.2]
最後登入時間 :
2021-06-25 21:09:43
a005. Eva 的回家作業 -- POJ | From: [101.12.48.238] | 發表日期 : 2020-05-13 09:22

#include <iostream>

using namespace std;

 

int main() {

 

int t, seq[3];

cin >> t;

 

for (int j = 1; j <= t; j++){

for(int i = 0; i<= 3; i++){

cin >> seq[i];

}

if(seq[0] + seq[3] == seq[1] + seq[2]){

cout << seq[0] << seq[1] << seq[2] << seq[3] << seq[3] + seq[1] - seq[0] << endl;

}

else{

cout << seq[0] << seq[1] << seq[2] << seq[3] << seq[3] * seq[1] / seq[0] << endl;

}

}

 

 

return 0;

}

 
ZeroJudge Forum