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


ethan555066 (unknown)


 
#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 (夜貓)


 
#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 而已