#21085: 一直WA


m923t917 (XDDDDXD)

School : No School
ID : 119406
IP address : [1.164.61.253]
Last Login :
2020-04-14 18:25:30
d984. 棄保效應 -- 板橋高中教學題 | From: [1.164.65.214] | Post Date : 2020-04-09 13:49

#include <iostream>

using namespace std;

int main()

{

long long int a,b,c;

while (cin >> a >> b >> c)

{

if (a<b and b<c)

{

if (a+b>c)

{

cout << "B" << endl;

}

else

{

cout << "C" << endl;

}

}

if (b<a and a<c)

{

if (a+b>c)

{

cout << "A" << endl;

}

else

{

cout << "C" << endl;

}

}

 

if (a<c and c<b)

{

if (a+c>b)

{

cout << "C" << endl;

}

else

{

cout << "B" << endl;

}

}

if (c<a and a<b)

{

if (a+c>b)

{

cout << "A" << endl;

}

else

{

cout << "B" << endl;

}

}

 

if (b<c and c<a)

{

if (b+c>a)

{

cout << "C" << endl;

}

else

{

cout << "A" << endl;

}

}

if (c<b and b<a)

{

if (b+c>a)

{

cout << "B" << endl;

}

else

{

cout << "A" << endl;

}

}

}

return 0;

}

找不出問題在哪

 

 
ZeroJudge Forum