#12206: 輸出0行??????


ethan555066 (unknown)

學校 : 臺北市私立延平高級中學
編號 : 60257
來源 : [111.235.252.96]
最後登入時間 :
2021-01-08 16:58:53

 
#include <iostream>
#include <cmath>
using namespace std;

int main(int argc, char** argv) {

int x,y,z;
while(cin >> x >> y >> z){

if(pow(x,2)+pow(y,2)==pow(z,2))
cout << z;
else if(pow(x,2)+pow(z,2)==pow(y,2))
cout << y;
else if(pow(y,2)+pow(z,2)==pow(x,2))
cout << x;

cout << endl;
}
return 0;
}
 
 
 
第 1 測資點(16%): WA (line:1)
輸出短少
您共輸出 0 行。
第 2 測資點(16%): WA (line:1)
輸出短少
您共輸出 0 行。
第 3 測資點(17%): WA (line:1)
輸出短少
您共輸出 0 行。
第 4 測資點(17%): WA (line:1)
輸出短少
您共輸出 0 行。
第 5 測資點(17%): WA (line:1)
輸出短少
您共輸出 0 行。
第 6 測資點(17%): WA (line:1)
輸出短少
您共輸出 0 行。
 
#12209: Re:輸出0行??????


justinO__o (夜貓)

學校 : 臺北市立成功高級中學
編號 : 51052
來源 : [111.71.212.14]
最後登入時間 :
2024-09-22 17:57:48

 
#include
#include
using namespace std;

int main(int argc, char** argv) {

int x,y,z;
while(cin >> x >> y >> z){

if(pow(x,2)+pow(y,2)==pow(z,2))
cout << z;
else if(pow(x,2)+pow(z,2)==pow(y,2))
cout << y;
else if(pow(y,2)+pow(z,2)==pow(x,2))
cout << x;

cout << endl;
}
return 0;
}
 
 
 
第 1 測資點(16%): WA (line:1)
輸出短少
您共輸出 0 行。
第 2 測資點(16%): WA (line:1)
輸出短少
您共輸出 0 行。
第 3 測資點(17%): WA (line:1)
輸出短少
您共輸出 0 行。
第 4 測資點(17%): WA (line:1)
輸出短少
您共輸出 0 行。
第 5 測資點(17%): WA (line:1)
輸出短少
您共輸出 0 行。
第 6 測資點(17%): WA (line:1)
輸出短少
您共輸出 0 行。
 




10 ^ 100000 ... 看看前一篇嘛 0u0

int 只到 2 ^ 31 而已