#27983:


11030067@mail.hpsh.tp.edu.tw (和平110級鄧雨珊)

School : 臺北市立和平高級中學
ID : 163096
IP address : [61.64.210.174]
Last Login :
2022-10-23 16:54:59
d980. 11479 - Is this the easiest problem? -- UVa11479 | From: [203.72.60.244] | Post Date : 2021-11-08 11:10

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

int main(){
int t;
long long int a[3];
cin >> t;
for (int i=1; i<=t; i++){
cin >> a[0] >> a[1] >> a[2];
sort(a, a+3);
cout <<"Case "<< i;
if (a[0]<=0){
cout <<": Invalid"<<endl;
}
else if (a[0]==a[2]){
cout <<": Equilateral"<<endl;
}
else if (a[0]==a[1] || a[1]==a[2]){
cout <<": Isosceles"<<endl;
}
else if (a[0]+a[1]>a[2]){
cout <<": Scalene"<<endl;
}
else {
cout <<": Invalid"<<endl;
}
}
}
 
ZeroJudge Forum