Pythagorean Triples
Time Limit: 1 sec
The Problem
A Pythagorean Triple is a sequence of 3 integers a, b, and c, satisfying the following properties:
1. 0 < a < b < c; and
2. a2 + b2 = c2.
Write a program that takes 3 integers a, b, and c as input and reports whether they form
a Pythagorean Triple.
For example:
3, 4, and 5 a Pythagorean Triple because it’s satisfy 2 condition
1. 0 < 3 < 4 < 5
2. 32 + 42 = 52
But -3, 4, 5 not a Pythagorean Triple because it’s does not satisfy condition 1.
The Input
The first line contains an integer number T, which indicates the number of test cases (0<T<100). Each test case is given in one line. This line contains three integer numbers a, b, and c (-1000<a, b, c<1000).
The Output
For each test case, print a single line “Case X: Yes” if a, b, and c are a Pythagorean Triple otherwise print “Case X: No”, here X is the case number start from 1 to T.
Sample Input
2
3 4 5
-3 4 5
Sample Output
Case 1: Yes
Case 2: No
[University Level]
ISCPC 2017 Preliminary
Problem Setter: Shahin ShamS