-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path7510.cpp
More file actions
35 lines (32 loc) · 714 Bytes
/
7510.cpp
File metadata and controls
35 lines (32 loc) · 714 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// 7510. 고급 수학
// 2021.06.06
// 수학
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
int n;
cin >> n;
int a, b, c, sum;
int cnt = 0;
while (n-- > 0)
{
cnt++;
cin >> a >> b >> c;
sum = a + b + c;
int minValue = min(min(a, b), c);
int maxValue = max(max(a, b), c);
int middleValue = sum - minValue - maxValue;
cout << "Scenario #" << cnt << ":" << endl;
if ((minValue * minValue) + (middleValue * middleValue) == maxValue * maxValue)
{
cout << "yes" << endl << endl;
}
else
{
cout << "no" << endl << endl;
}
}
return 0;
}