s_id
stringlengths 10
10
| p_id
stringlengths 6
6
| u_id
stringlengths 10
10
| date
stringlengths 10
10
| language
stringclasses 1
value | original_language
stringclasses 11
values | filename_ext
stringclasses 1
value | status
stringclasses 1
value | cpu_time
int64 0
100
| memory
stringlengths 4
6
| code_size
int64 15
14.7k
| code
stringlengths 15
14.7k
| problem_id
stringlengths 6
6
| problem_description
stringlengths 358
9.83k
| input
stringlengths 2
4.87k
| output
stringclasses 807
values | __index_level_0__
int64 1.1k
1.22M
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s648668851
|
p00003
|
u531482846
|
1506201121
|
Python
|
Python3
|
py
|
Accepted
| 70
|
7640
| 142
|
for _ in range(int(input())):
a, b, c = sorted(map(int, input().split()))
if a * a + b*b == c* c:
print("YES")
else:
print("NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,802
|
s875133992
|
p00003
|
u506705885
|
1506351616
|
Python
|
Python3
|
py
|
Accepted
| 40
|
7928
| 149
|
[print("YES" if x[0] + x[1] == x[2] else "NO") for x in [sorted([x * x for x in [int(i) for i in input().split(" ")]]) for _ in range(int(input()))]]
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,803
|
s315657733
|
p00003
|
u343251190
|
1507220916
|
Python
|
Python3
|
py
|
Accepted
| 50
|
7632
| 202
|
n = int(input())
for i in range(n):
a = list(map(int, input().split()))
m = max(a)
b = sum([i**2 for i in a if i != m])
if (m**2 == b):
print("YES")
else:
print("NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,804
|
s041391030
|
p00003
|
u256256172
|
1507281481
|
Python
|
Python3
|
py
|
Accepted
| 60
|
7684
| 136
|
for _ in range(int(input())):
x = list(sorted(map(int, input().split())))
print("YES" if x[0]**2 + x[1]**2 == x[2]**2 else "NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,805
|
s752764363
|
p00003
|
u947762778
|
1507545579
|
Python
|
Python3
|
py
|
Accepted
| 60
|
7644
| 235
|
num = int(input())
for i in range(num):
a, b, c = map(int, input().split())
a2 = a ** 2
b2 = b ** 2
c2 = c ** 2
if a2 + b2 == c2 or a2 + c2 == b2 or c2 + b2 == a2 :
print('YES')
else:
print('NO')
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,806
|
s088881146
|
p00003
|
u742505495
|
1507618430
|
Python
|
Python3
|
py
|
Accepted
| 40
|
7668
| 177
|
import sys
import math
n = int(input())
for i in range(n):
a = list(map(int, input().split()))
a.sort()
if a[0]**2 + a[1]**2 == a[2]**2:
print('YES')
else:
print('NO')
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,807
|
s660459909
|
p00003
|
u197670577
|
1508088978
|
Python
|
Python
|
py
|
Accepted
| 20
|
6440
| 187
|
n = int(raw_input())
for i in range(n):
e = map(int, raw_input().split())
e.sort()
if e[2] * e[2]== e[0] * e[0] + e[1] * e[1]:
print "YES"
else:
print "NO"
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,808
|
s026135831
|
p00003
|
u422087503
|
1508707603
|
Python
|
Python3
|
py
|
Accepted
| 40
|
7572
| 230
|
N = int(input())
for i in range(N):
a, b, c = map(int, input().split())
a2 = a ** 2
b2 = b ** 2
c2 = c ** 2
if a2 + b2 == c2 or a2 + c2 == b2 or b2 + c2 == a2:
print('YES')
else:
print('NO')
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,809
|
s452991613
|
p00003
|
u422087503
|
1508794310
|
Python
|
Python3
|
py
|
Accepted
| 50
|
7628
| 228
|
N = int(input())
for i in range(N):
line = input()
l = [None]*3
l[0] = int(line.split()[0])
l[1] = int(line.split()[1])
l[2] = int(line.split()[2])
l.sort()
if l[0]**2+l[1]**2==l[2]**2:
print("YES")
else:
print("NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,810
|
s998951414
|
p00003
|
u926657458
|
1508956578
|
Python
|
Python3
|
py
|
Accepted
| 50
|
7644
| 247
|
n = int(input())
for _ in range(n):
l = list(map(int,input().split()))
idx = l.index(max(l))
c = l[idx]
a, b = [x for i,x in enumerate(l) if i != idx]
if a**2 + b**2 == c**2:
print("YES")
else:
print("NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,811
|
s509869747
|
p00003
|
u424041287
|
1509097131
|
Python
|
Python3
|
py
|
Accepted
| 40
|
7636
| 199
|
def tri(a,b,c):
return a**2 == b**2 + c**2
for time in range(int(input())):
x,y,z = [int(i) for i in input().split()]
if tri(x,y,z) or tri(y,z,x) or tri(z,x,y):
print("YES")
else:
print("NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,812
|
s032425371
|
p00003
|
u123686770
|
1509339000
|
Python
|
Python
|
py
|
Accepted
| 20
|
6416
| 192
|
n = int(raw_input())
while n > 0:
d = map(int, raw_input().split())
d.sort()
a = d[0]
b = d[1]
c = d[2]
if (c*c) == (a*a + b*b):
print "YES"
else:
print "NO"
n = n-1
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,813
|
s107278212
|
p00003
|
u914007790
|
1509344064
|
Python
|
Python3
|
py
|
Accepted
| 40
|
7664
| 244
|
ans = []
for i in range(int(input())):
a, b, c = map(int, input().split())
lst = [a, b, c]
lst.sort()
if lst[2]**2 == lst[0]**2 + lst[1]**2:
ans.append("YES")
else:
ans.append("NO")
for i in ans:
print(i)
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,814
|
s444385500
|
p00003
|
u776758454
|
1510443626
|
Python
|
Python3
|
py
|
Accepted
| 30
|
7888
| 245
|
def main():
data_count = int(input())
data = [list(map(int, input().split())) for i in range(data_count)]
for item in data:
item.sort()
print('YES') if item[0]**2 + item[1]**2 == item[2]**2 else print('NO')
main()
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,815
|
s233202896
|
p00003
|
u917432951
|
1510707210
|
Python
|
Python3
|
py
|
Accepted
| 40
|
7684
| 342
|
def isRightTriangle(lineList):
if lineList[0]**2 + lineList[1]**2 == lineList[2]**2:
return True
else:
return False
if __name__ == '__main__':
n = (int)(input())
for _ in range(0,n):
tmp = list(map(int,input().split()))
tmp.sort()
print("YES" if isRightTriangle(tmp) else "NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,816
|
s146713054
|
p00003
|
u488038316
|
1510801324
|
Python
|
Python3
|
py
|
Accepted
| 40
|
7576
| 292
|
# -*-coding:utf-8
lineNum = int(input())
for i in range(lineNum):
line = input()
tokens = list(map(int, line.strip().split()))
tokens.sort()
a, b, c = tokens[0], tokens[1], tokens[2]
if pow(a,2)+pow(b,2) == pow(c,2):
print('YES')
else:
print('NO')
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,817
|
s246111400
|
p00003
|
u471400255
|
1510980413
|
Python
|
Python3
|
py
|
Accepted
| 40
|
7692
| 221
|
N = int(input())
ToF = []
for i in range(N):
A = list(map(int,input().split()))
A.sort()
if A[0]**2 + A[1]**2 == A[2]**2:
ToF.append("YES")
else:
ToF.append("NO")
for i in ToF:
print(i)
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,818
|
s817595366
|
p00003
|
u742178809
|
1511327406
|
Python
|
Python3
|
py
|
Accepted
| 30
|
7740
| 298
|
import sys;
#from me.io import dup_file_stdin
#@dup_file_stdin
def solve():
n=int(sys.stdin.readline())
for i in range(n):
x=[int(num) for num in sys.stdin.readline().split(' ')]
x.sort();
if(x[0]**2+x[1]**2==x[2]**2): print("YES")
else :print("NO")
solve()
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,819
|
s789609079
|
p00003
|
u947718497
|
1511526107
|
Python
|
Python
|
py
|
Accepted
| 20
|
6276
| 270
|
import sys
l = sys.stdin.readlines ()
del l[0] # Delete number represents the number of detasets.
for line in l:
data = map (int, line.split (" "))
data.sort(reverse=True)
if data[0]**2 == data[1]**2 + data[2]**2:
print ("YES")
else: print ("NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,820
|
s289270883
|
p00003
|
u548155360
|
1512380308
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5672
| 285
|
# coding=utf-8
import math
N = int(input())
for i in range(N):
length_list = list(map(int, input().split()))
length_list.sort()
if math.pow(length_list[0], 2) + math.pow(length_list[1], 2) == math.pow(length_list[2], 2):
print('YES')
else:
print('NO')
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,821
|
s373231856
|
p00003
|
u779220087
|
1513093816
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5720
| 1,235
|
# usr/bin/python
# coding: utf-8
################################################################################
# Is it a Right Triangle?
# Write a program which judges wheather given length of three side form a right triangle.
# Print "YES" if the given sides (integers) form a right triangle, "NO" if not so.
#
# Input
# Input consists of several data sets. In the first line, the number of data set,
# N is given. Then, N lines follow, each line corresponds to a data set.
# A data set consists of three integers separated by a single space.
#
# Constraints
# 1 ??? length of the side ??? 1,000
# N ??? 1,000
# Output
# For each data set, print "YES" or "NO".
#
# Sample Input
# 3
# 4 3 5
# 4 3 6
# 8 8 8
# Output for the Sample Input
# YES
# NO
# NO
#
################################################################################
if __name__ == "__main__":
num = int(input())
inputline = [""]*num
for i in range(0,num):
inputline[i] = input()
for line in inputline:
a = int(line.split(" ")[0])
b = int(line.split(" ")[1])
c = int(line.split(" ")[2])
if (a*a+b*b == c*c or b*b+c*c == a*a or c*c+a*a == b*b):
print("YES")
else:
print("NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,822
|
s360977183
|
p00003
|
u842823276
|
1513135876
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5600
| 230
|
def ifTriangle(a, b, c):
if (a**2) + (b**2) == c**2: print("YES")
else: print("NO")
n=int(input())
for i in range(n):
lines=list(map(int, input().split()))
lines.sort()
ifTriangle(lines[0], lines[1], lines[2])
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,823
|
s021720200
|
p00003
|
u987649781
|
1513178535
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5600
| 217
|
N = input()
a = []
for i in range(int(N)):
s = input().split()
ss = [int(s[0]), int(s[1]), int(s[2])]
ss.sort()
if ss[2]**2 == ss[0]**2 + ss[1]**2:
print("YES")
else:
print("NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,824
|
s513020301
|
p00003
|
u024715419
|
1513243443
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5600
| 161
|
n = int(input())
for i in range(n):
l = list(map(int, input().split()))
l.sort()
if l[0]**2 + l[1]**2 == l[2]**2: print("YES")
else: print("NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,825
|
s776613876
|
p00003
|
u846136461
|
1513433640
|
Python
|
Python
|
py
|
Accepted
| 10
|
4668
| 293
|
# coding: utf-8
n = int(raw_input())
for i in range(n):
data = map(int, raw_input().split())
if data[0]**2 == data[1]**2 + data[2]**2:
print("YES")
elif data[1]**2 == data[2]**2 + data[0]**2:
print("YES")
elif data[2]**2 == data[0]**2 + data[1]**2:
print("YES")
else:
print("NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,826
|
s940785777
|
p00003
|
u546285759
|
1513667815
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5596
| 244
|
def triangle(dataset):
a, b, c = dataset
if a*a + b*b == c*c:
return 1
return 0
N = int(input())
for _ in range(N):
dataset = sorted(map(int, input().split()))
flag = triangle(dataset)
print(["NO", "YES"][flag])
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,827
|
s051296122
|
p00003
|
u183079216
|
1513770766
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5604
| 188
|
N=int(input())
for i in range(N):
lst=sorted([int(s) for s in input().split()],reverse=True)
if lst[0]**2 == lst[1]**2+lst[2]**2:
print("YES")
else:
print("NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,828
|
s328864710
|
p00003
|
u706217959
|
1514095525
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5848
| 755
|
class triangle():
def __init__(self,a,b,c):
self.a = a
self.b = b
self.c = c
def calc(self):
a = int(self.a**2)
b = int(self.b**2)
c = int(self.c**2)
if (a+b == c) or (b+c == a) or (a+c == b):
return True
else:
return False
def print(self):
ans = self.calc()
if ans:
print("YES")
else:
print("NO")
def main():
data = []
array_size = int(input())
for i in range(array_size):
n = input().split()
a = int(n[0])
b = int(n[1])
c = int(n[2])
data.append(triangle(a,b,c))
for array in data:
array.print()
if __name__ == "__main__":
main()
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,829
|
s450854464
|
p00003
|
u480287988
|
1514104771
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5600
| 230
|
def ifTriangle(a, b, c):
if (a**2) + (b**2) == c**2: print("YES")
else: print("NO")
n=int(input())
for i in range(n):
lines=list(map(int, input().split()))
lines.sort()
ifTriangle(lines[0], lines[1], lines[2])
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,830
|
s524504032
|
p00003
|
u764789069
|
1514110516
|
Python
|
Python
|
py
|
Accepted
| 10
|
4644
| 184
|
n = int(raw_input())
for i in range(0, n):
li = map(int, raw_input().split())
li.sort()
if li[0]**2 + li[1]**2 == li[2]**2:
print 'YES'
else:
print 'NO'
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,831
|
s139417264
|
p00003
|
u764789069
|
1514112743
|
Python
|
Python
|
py
|
Accepted
| 10
|
4664
| 288
|
count=int(raw_input())
for i in range(0,count):
a,b,c=map(int,raw_input().split())
if pow(a,2)+pow(b,2)==pow(c,2):
print 'YES'
elif pow(a,2)+pow(c,2)==pow(b,2):
print 'YES'
elif pow(b,2)+pow(c,2)==pow(a,2):
print 'YES'
else:
print 'NO'
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,832
|
s978848429
|
p00003
|
u764789069
|
1514113089
|
Python
|
Python
|
py
|
Accepted
| 20
|
4684
| 362
|
count=int(raw_input())
ans =[]
for i in range(0,count):
a,b,c=map(int,raw_input().split())
if pow(a,2)+pow(b,2)==pow(c,2):
ans.append("YES")
elif pow(a,2)+pow(c,2)==pow(b,2):
ans.append("YES")
elif pow(b,2)+pow(c,2)==pow(a,2):
ans.append("YES")
else:
ans.append("NO")
for i in range(0,count):
print ans[i]
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,833
|
s962726827
|
p00003
|
u298999032
|
1514182946
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5596
| 243
|
N=int(input())
for i in range(N):
a,b,c=map(int,input().split())
A=a**2
B=b**2
C=c**2
if A+B==C:
print('YES')
elif A+C==B:
print('YES')
elif B+C==A:
print('YES')
else:
print('NO')
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,834
|
s520864645
|
p00003
|
u298999032
|
1514183062
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5596
| 207
|
N=int(input())
for i in range(N):
a,b,c=map(int,input().split())
A=a**2
B=b**2
C=c**2
if A+B==C:print('YES')
elif A+C==B:print('YES')
elif B+C==A:print('YES')
else:print('NO')
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,835
|
s031911519
|
p00003
|
u600263347
|
1514208063
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5604
| 278
|
def main():
n = int(input())
for i in range(n):
Array = list(map(int,input().split()))
Array.sort()
if Array[2]**2 == Array[0]**2 + Array[1]**2:
print("YES")
else:
print("NO")
if __name__ == '__main__':
main()
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,836
|
s439263419
|
p00003
|
u028347703
|
1514530341
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5604
| 143
|
n = int(input())
for i in range(n):
l = [int(j) for j in input().split()]
l.sort()
print("YES" if l[0]**2 + l[1]**2 == l[2]**2 else "NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,837
|
s532144763
|
p00003
|
u585035894
|
1514533506
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5592
| 146
|
for _ in range(int(input())):
l = list(map(int, input().split()))
l.sort()
print('YES' if l[0]**2 + l[1] ** 2 == l[2] ** 2 else 'NO')
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,838
|
s565913320
|
p00003
|
u183224403
|
1514942830
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5600
| 228
|
n = int(input())
for i in range(0, n):
nums = list(map(int, input().split()))
max_num = max(nums)
nums.remove(max_num)
if max_num**2 == nums[0]**2 + nums[1]**2:
print("YES")
else:
print("NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,839
|
s001221965
|
p00003
|
u764789069
|
1515083202
|
Python
|
Python
|
py
|
Accepted
| 10
|
4684
| 363
|
count=int(raw_input())
ans =[]
for i in range(0,count):
a,b,c=map(int,raw_input().split())
if pow(a,2)+pow(b,2)==pow(c,2):
ans.append("YES")
elif pow(a,2)+pow(c,2)==pow(b,2):
ans.append("YES")
elif pow(b,2)+pow(c,2)==pow(a,2):
ans.append("YES")
else:
ans.append("NO")
for i in range(0,count):
print ans[i]
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,840
|
s775535308
|
p00003
|
u043254318
|
1515432339
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5600
| 185
|
N = int(input())
for l in range(N):
a = [int(i) for i in input().split()]
a.sort()
if a[0]*a[0] + a[1]*a[1] == a[2]*a[2]:
print("YES")
else:
print("NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,841
|
s732346627
|
p00003
|
u737311644
|
1516415824
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5596
| 174
|
n=int(input())
for i in range(n):
c,d,b=map(int,input().split())
if c*c+d*d==b*b or c*c+b*b==d*d or b*b+d*d==c*c:
print("YES")
else:
print("NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,842
|
s102211096
|
p00003
|
u150984829
|
1516549624
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5608
| 101
|
for _ in[0]*int(input()):
a,b,c=sorted(map(int,input().split()))
print(['NO','YES'][a*a+b*b==c*c])
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,843
|
s167328600
|
p00003
|
u150984829
|
1516549627
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5604
| 101
|
for _ in[0]*int(input()):
a,b,c=sorted(map(int,input().split()))
print(['NO','YES'][a*a+b*b==c*c])
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,844
|
s788491127
|
p00003
|
u150984829
|
1516549639
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5608
| 101
|
for _ in[0]*int(input()):
a,b,c=sorted(map(int,input().split()))
print(['NO','YES'][a*a+b*b==c*c])
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,845
|
s987154720
|
p00003
|
u150984829
|
1516549696
|
Python
|
Python3
|
py
|
Accepted
| 50
|
5612
| 101
|
for _ in[0]*int(input()):
a,b,c=sorted(map(int,input().split()))
print(['NO','YES'][a*a+b*b==c*c])
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,846
|
s447987183
|
p00003
|
u150984829
|
1516549708
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5604
| 101
|
for _ in[0]*int(input()):
a,b,c=sorted(map(int,input().split()))
print(['NO','YES'][a*a+b*b==c*c])
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,847
|
s047532800
|
p00003
|
u150984829
|
1516549710
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5608
| 101
|
for _ in[0]*int(input()):
a,b,c=sorted(map(int,input().split()))
print(['NO','YES'][a*a+b*b==c*c])
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,848
|
s171044858
|
p00003
|
u150984829
|
1516549727
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5716
| 108
|
import sys
input()
for e in sys.stdin:
a,b,c=sorted(map(int,e.split()))
print(['NO','YES'][a*a+b*b==c*c])
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,849
|
s865397980
|
p00003
|
u150984829
|
1516549733
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5716
| 108
|
import sys
input()
for e in sys.stdin:
a,b,c=sorted(map(int,e.split()))
print(['NO','YES'][a*a+b*b==c*c])
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,850
|
s901153146
|
p00003
|
u150984829
|
1516549797
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5612
| 101
|
for _ in[0]*int(input()):
a,b,c=sorted(map(int,input().split()))
print(['NO','YES'][a*a+b*b==c*c])
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,851
|
s149498844
|
p00003
|
u150984829
|
1516549801
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5612
| 101
|
for _ in[0]*int(input()):
a,b,c=sorted(map(int,input().split()))
print(['NO','YES'][a*a+b*b==c*c])
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,852
|
s746449598
|
p00003
|
u150984829
|
1516549803
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5604
| 101
|
for _ in[0]*int(input()):
a,b,c=sorted(map(int,input().split()))
print(['NO','YES'][a*a+b*b==c*c])
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,853
|
s506577439
|
p00003
|
u150984829
|
1516549806
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5612
| 101
|
for _ in[0]*int(input()):
a,b,c=sorted(map(int,input().split()))
print(['NO','YES'][a*a+b*b==c*c])
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,854
|
s707152447
|
p00003
|
u150984829
|
1516549813
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5608
| 101
|
for _ in[0]*int(input()):
a,b,c=sorted(map(int,input().split()))
print(['NO','YES'][a*a+b*b==c*c])
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,855
|
s861917743
|
p00003
|
u803045841
|
1516558802
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5640
| 160
|
import sys
input()
for e in sys.stdin:
a, b, c = sorted(map(int, e.split()))
if a**2 + b**2 == c**2:
print('YES')
else:
print('NO')
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,856
|
s228967488
|
p00003
|
u150984829
|
1516625464
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5640
| 119
|
import sys
input()
for a,b,c in map(lambda x:sorted(map(int,x.split())),sys.stdin):
print(['NO','YES'][a*a+b*b==c*c])
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,857
|
s874090133
|
p00003
|
u536089081
|
1517565552
|
Python
|
Python3
|
py
|
Accepted
| 50
|
5604
| 164
|
for _ in range(int(input())):
datasqr = [i ** 2 for i in sorted(list(map(int, input().split())))]
print('YES' if sum(datasqr[:2]) == datasqr[-1] else 'NO')
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,858
|
s056284443
|
p00003
|
u661290476
|
1517636851
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5604
| 197
|
n = int(input())
for _ in range(n):
edges = sorted([int(i) for i in input().split()])
if edges[0] ** 2 + edges[1] ** 2 == edges[2] ** 2:
print("YES")
else:
print("NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,859
|
s648310059
|
p00003
|
u780025254
|
1517967270
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5600
| 233
|
n = int(input())
for _ in range(n):
a, b, c = map(int, input().split())
if (a**2 + b**2 == c**2) or\
(b**2 + c**2 == a**2) or\
(c**2 + a**2 == b**2):
print("YES")
else:
print("NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,860
|
s082670865
|
p00003
|
u780025254
|
1517967272
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5592
| 233
|
n = int(input())
for _ in range(n):
a, b, c = map(int, input().split())
if (a**2 + b**2 == c**2) or\
(b**2 + c**2 == a**2) or\
(c**2 + a**2 == b**2):
print("YES")
else:
print("NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,861
|
s664776772
|
p00003
|
u780025254
|
1517967275
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5600
| 233
|
n = int(input())
for _ in range(n):
a, b, c = map(int, input().split())
if (a**2 + b**2 == c**2) or\
(b**2 + c**2 == a**2) or\
(c**2 + a**2 == b**2):
print("YES")
else:
print("NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,862
|
s287466615
|
p00003
|
u780025254
|
1517967596
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5592
| 233
|
n = int(input())
for _ in range(n):
a, b, c = map(int, input().split())
if (a**2 + b**2 == c**2) or\
(b**2 + c**2 == a**2) or\
(c**2 + a**2 == b**2):
print("YES")
else:
print("NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,863
|
s650633225
|
p00003
|
u780025254
|
1517967596
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5592
| 233
|
n = int(input())
for _ in range(n):
a, b, c = map(int, input().split())
if (a**2 + b**2 == c**2) or\
(b**2 + c**2 == a**2) or\
(c**2 + a**2 == b**2):
print("YES")
else:
print("NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,864
|
s743340631
|
p00003
|
u585184379
|
1518947493
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5596
| 241
|
while True:
n = int(input())
if n <= 1000:
break
for i in range(1, n+1):
l = list(map(int, input().split()))
l.sort()
if l[0]*l[0]+l[1]*l[1] == l[2]*l[2]:
print('YES')
else :
print('NO')
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,865
|
s951594578
|
p00003
|
u613534067
|
1519019167
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5596
| 247
|
# AOJ通らなかった...何故かはわからん
N = int(input())
for i in range(N):
a = list(map(int, input().split(" ")))
a.sort()
#print(a)
if(a[2]**2 == a[0]**2 + a[1]**2):
print("YES")
else:
print("NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,866
|
s336368963
|
p00003
|
u328199937
|
1519037038
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5592
| 214
|
N = int(input())
for i in range(N):
a, b, c = map(int, input().split(" "))
if a * a + b * b == c * c or b * b + c * c == a * a or c * c + a * a == b * b:
print("YES")
else:
print("NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,867
|
s329571502
|
p00003
|
u553148578
|
1519798952
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5592
| 167
|
n = int(input())
for i in range(n):
li = sorted(map(int, input().split()))
if(pow(li[0], 2) + pow (li[1], 2) == pow(li[2], 2)):
print('YES')
else:
print('NO')
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,868
|
s826594975
|
p00003
|
u646461156
|
1521005558
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5596
| 131
|
n=int(input())
for i in range(n):
l=list(map(int,input().split()))
l.sort()
print("YES" if l[0]**2+l[1]**2==l[2]**2 else "NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,869
|
s950762312
|
p00003
|
u704573769
|
1521209271
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5760
| 704
|
def solve():
data = read()
result = think(data)
write(result)
def read():
n = int(input())
data = []
for i in range(n):
data.append(read_data())
return data
def read_data():
return list(map(int, input().split(' ')))
def think(data):
result = []
for d in data:
if is_right_triangle(d):
result.append('YES')
else:
result.append('NO')
return result
def is_right_triangle(d):
x, y, z = d[0], d[1], d[2]
return (x ** 2 == y ** 2 + z ** 2) or (y ** 2 == z ** 2 + x ** 2) or (z ** 2 == x ** 2 + y ** 2)
def write(result):
for r in result:
print(r)
if __name__ == '__main__':
solve()
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,870
|
s459304892
|
p00003
|
u930302179
|
1522683403
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5596
| 149
|
for i in range(int(input())):
a,b,c=sorted(map(int, input().split()))
if a**2+b**2==c**2:
print('YES')
else:
print('NO')
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,871
|
s150974834
|
p00003
|
u179070318
|
1522822100
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5600
| 201
|
for i in range(int(input())):
temp = [int(x) for x in input().split()]
stemp = sorted(temp)
if stemp[2]**2 == stemp[1]**2 + stemp[0]**2:
print('YES')
else:
print('NO')
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,872
|
s250378016
|
p00003
|
u027874809
|
1523518358
|
Python
|
Python3
|
py
|
Accepted
| 50
|
5596
| 180
|
s = int(input())
for x in range(s):
r = sorted(list(map(int, input().split())))
if r[2] ** 2 == r[0] ** 2 + r[1] ** 2:
print('YES')
else:
print('NO')
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,873
|
s362250435
|
p00003
|
u352394527
|
1523610253
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5608
| 208
|
input()
while True:
try:
lst = list(map(int,input().split()))
lst.sort()
if lst[2] ** 2 == lst[1] ** 2 + lst[0] ** 2:
print("YES")
else:
print("NO")
except EOFError:
break
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,874
|
s839890759
|
p00003
|
u349420778
|
1523984800
|
Python
|
Python3
|
py
|
Accepted
| 40
|
6124
| 930
|
import collections
import sys
def read_prob():
inputs = []
try:
counter = 0
while True:
if counter == 0:
line = input().strip()
size = int(line)
else:
line = input().strip().split()
a, b, c = line[0], line[1], line[2]
inputs.append([int(a), int(b), int(c)])
counter += 1
except EOFError:
pass
return inputs
def triangle(inputs):
f = lambda x: x * x
inputs = list(map(f, inputs))
# print(inputs)
a, b, c = inputs[0], inputs[1], inputs[2]
if a + b == c:
return True
elif a + c == b:
return True
elif b + c == a:
return True
else:
return False
if __name__ == '__main__':
inputs = read_prob()
for inp in inputs:
if triangle(inp):
print("YES")
else:
print("NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,875
|
s816231591
|
p00003
|
u585035894
|
1524290940
|
Python
|
Python3
|
py
|
Accepted
| 50
|
5604
| 169
|
for _ in range(int(input())):
a = [int(i) for i in input().split()]
print('YES') if a[0]**2 + a[1]**2 + a[2] ** 2 - max(a) **2 == max(a) ** 2 else print('NO')
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,876
|
s930926058
|
p00003
|
u120970792
|
1524812627
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5656
| 181
|
N = input()
for i in range(int(N)):
l = list(map(int, input().split()))
l.sort()
if(l[2] == (l[0]**2+l[1]**2)**0.5):
print("YES")
else:
print("NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,877
|
s866686754
|
p00003
|
u533681846
|
1525018811
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5604
| 190
|
N=int(input())
a=[0,0,0]
for i in range(N):
a[0],a[1],a[2] = map(int, input().split())
a.sort()
if a[0]**2+a[1]**2 == a[2]**2:
print("YES")
else:
print("NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,878
|
s128793835
|
p00003
|
u223900719
|
1525056793
|
Python
|
Python
|
py
|
Accepted
| 10
|
4648
| 150
|
N=input()
for i in range(N):
a=map(int,raw_input().split())
a.sort()
a.reverse()
if a[0]**2==a[1]**2+a[2]**2:
print "YES"
else:
print "NO"
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,879
|
s825365882
|
p00003
|
u480716860
|
1525223179
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5712
| 441
|
N = int(input())
A = []
B = []
C = []#最長辺
for i in range(N):
a, b, c = map(int, input().split())
if(a > b):#a,bを昇順に並び替える
t = a
a = b
b = t
if(b > c):#b,cを昇順に並び替える
t = b
b = c
c = t
A.append(a)
B.append(b)
C.append(c)
for i in range(N):
if(A[i]**2 + B[i]**2 == C[i]**2):
print("YES")
else:
print("NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,880
|
s300293426
|
p00003
|
u724548524
|
1525729261
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5604
| 142
|
for _ in range(int(input())):
e = list(map(int, input().split()))
print("YES" if max(e) ** 2 * 2 == sum(i ** 2 for i in e) else "NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,881
|
s148341212
|
p00003
|
u945249026
|
1525769387
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5728
| 237
|
N = int(input())
lst = []
for _ in range(N):
a, b, c = map(int,input().split())
lst.append([a, b, c])
for i in lst:
i.sort()
if i[0] ** 2 + i[1] ** 2 == i[2] ** 2:
print('YES')
else:
print('NO')
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,882
|
s614343943
|
p00003
|
u547838013
|
1526056425
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5592
| 185
|
n = int(input())
for i in range(n):
s = list(map(int, input().split()))
s.sort()
if(s[2] ** 2 == s[1] ** 2 + s[0] ** 2):
print('YES')
else:
print('NO')
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,883
|
s455766799
|
p00003
|
u802537549
|
1526202133
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5608
| 143
|
for i in range(int(input())):
a, b, c = sorted([int(i) for i in input().split()])
print('YES' if a ** 2 + b ** 2 == c ** 2 else 'NO')
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,884
|
s000567523
|
p00003
|
u940977872
|
1526354804
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5604
| 203
|
N = int(input())
for i in range(N):
triangle = sorted([int(n) for n in input().split()])
if triangle[0]**2 + triangle[1]**2 == triangle[2]**2:
print('YES')
else:
print('NO')
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,885
|
s831239250
|
p00003
|
u136916346
|
1527348011
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5756
| 167
|
o=[sorted(map(int,input().split())) for i in range(int(input()))]
for i in o:
if i[0]**2 + i[1]**2 == i[2]**2:
print("YES")
else:
print("NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,886
|
s867314070
|
p00003
|
u002010345
|
1527682742
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5604
| 235
|
def main():
n = int(input())
for i in range(n):
a=[int(x) for x in input().split()]
a.sort()
if a[0] ** 2 + a[1] ** 2 != a[2] ** 2:
print("NO")
else:
print("YES")
main()
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,887
|
s488658344
|
p00003
|
u328733599
|
1528354938
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5600
| 300
|
round = int(input(""))
for i in range (0,round):
arr = []
temp = input("")
a,b,c = temp.split(" ")
arr.append(int(a))
arr.append(int(b))
arr.append(int(c))
arr.sort()
if(pow(arr[0],2)+pow(arr[1],2)==pow(arr[2],2)):
print("YES")
else:
print("NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,888
|
s420688529
|
p00003
|
u328733599
|
1528354961
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5596
| 300
|
round = int(input(""))
for i in range (0,round):
arr = []
temp = input("")
a,b,c = temp.split(" ")
arr.append(int(a))
arr.append(int(b))
arr.append(int(c))
arr.sort()
if(pow(arr[0],2)+pow(arr[1],2)==pow(arr[2],2)):
print("YES")
else:
print("NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,889
|
s864355459
|
p00003
|
u458530128
|
1528362065
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5760
| 197
|
N = int(input())
lst = [list(map(int, input().split())) for _ in range(N)]
for i in lst:
i.sort()
if i[0] ** 2 + i[1] ** 2 == i[2] ** 2:
print('YES')
else:
print('NO')
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,890
|
s646984576
|
p00003
|
u847467233
|
1528377926
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5596
| 244
|
# AOJ 0003 Is it a Right Triangle?
# Python3 2018.6.7 bal4u
n = int(input())
for i in range(n):
a = list(map(int, input().split()))
a.sort()
if a[0]*a[0] + a[1]*a[1] == a[2]*a[2]:
print('YES')
else:
print('NO')
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,891
|
s798137558
|
p00003
|
u563075864
|
1529160540
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5600
| 189
|
N = int(input())
for i in range(N):
a = [int(i) for i in input().split()]
a.sort(reverse=True)
if a[0]**2 == a[1]**2+a[2]**2:
print('YES')
else:
print('NO')
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,892
|
s161681678
|
p00003
|
u847467233
|
1529528113
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5592
| 189
|
# AOJ 0003 Is it a Right Triangle?
# Python3 2018.6.7 bal4u
for _ in range(int(input())):
a, b, c = sorted(list(map(int, input().split())))
print("YES" if a**2 + b**2 == c**2 else "NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,893
|
s176331758
|
p00003
|
u316584871
|
1530002847
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5600
| 191
|
for i in range(int(input())):
llist = list(map(int,input().split()))
llist.sort()
if(llist[2]**2 == llist[0]**2 + llist[1]**2):
print('YES')
else:
print('NO')
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,894
|
s088669244
|
p00003
|
u841567836
|
1530265620
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5612
| 351
|
def judge(lists):
lists.sort()
if lists[0] ** 2 + lists[1] ** 2 - lists[2] ** 2:
return False
else:
return True
def run():
N = int(input())
for _ in range(N):
if judge([int(x) for x in input().split()]):
print("YES")
else:
print("NO")
if __name__ == '__main__':
run()
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,895
|
s752554245
|
p00003
|
u995990363
|
1530670237
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5760
| 372
|
def run():
n = int(input())
data = []
for _ in range(n):
data.append(list(map(int, input().split())))
for d in data:
_data = d[:]
mx = max(_data)
_data.remove(mx)
if mx**2 == sum([x**2 for x in _data]):
print('YES')
else:
print('NO')
if __name__ == '__main__':
run()
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,896
|
s047806959
|
p00003
|
u517745281
|
1344349713
|
Python
|
Python
|
py
|
Accepted
| 20
|
4388
| 161
|
print "\n".join(s for s in map(lambda x:x[0]+x[1]==x[2] and 'YES' or 'NO', [sorted(int(x)**2 for x in raw_input().split(' ')) for i in range(int(raw_input()))]))
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,897
|
s085451667
|
p00003
|
u263247628
|
1344571250
|
Python
|
Python
|
py
|
Accepted
| 20
|
4228
| 195
|
n = int(raw_input())
for i in range(0, n):
edge = map(int, raw_input().split(" "))
edge.sort()
if edge[2]*edge[2] == edge[0]*edge[0]+edge[1]*edge[1]: print "YES"
else: print "NO"
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,898
|
s258004039
|
p00003
|
u894941280
|
1344730635
|
Python
|
Python
|
py
|
Accepted
| 10
|
4224
| 145
|
x = int(input())
for a in range(x):
y = map(int,raw_input().split())
y.sort()
if y[2]**2-y[1]**2 == y[0]**2:
print "YES"
else:
print "NO"
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,899
|
s066304000
|
p00003
|
u891318575
|
1346472169
|
Python
|
Python
|
py
|
Accepted
| 20
|
4372
| 265
|
# -*- coding: utf-8 -*-
import math
num = int(raw_input())
for i in range(num):
list = [int(x) for x in raw_input().split(" ")]
list.sort(lambda n1, n2:n2 - n1)
if list[0]**2 == list[1]**2 + list[2]**2:
print("YES")
else:
print("NO")
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,900
|
s662125833
|
p00003
|
u724947062
|
1346479027
|
Python
|
Python
|
py
|
Accepted
| 20
|
4236
| 433
|
import sys
N = int(sys.stdin.readline())
def check(num_list):
largest = max(num_list)
largest_idx = num_list.index(largest)
tmp = sum([pow(x, 2) for i, x in enumerate(num_list) if i != largest_idx])
if tmp == pow(largest, 2):
return "YES"
else:
return "NO"
for i in xrange(N):
line = sys.stdin.readline()
num_list = map(int, line.strip().split())
print "{0}".format(check(num_list))
|
p00003
|
<H1>Is it a Right Triangle?</H1>
<p>
Write a program which judges wheather given length of three side form a right triangle. Print "<span>YES</span>" if the given sides (integers) form a right triangle, "<span>NO</span>" if not so.
</p>
<H2>Input</H2>
<p>
Input consists of several data sets. In the first line, the number of data set, <var>N</var> is given. Then, <var>N</var> lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
</p>
<h2>Constraints</h2>
<ul>
<li> 1 ≤ length of the side ≤ 1,000</li>
<li> <var>N</var> ≤ 1,000</li>
</ul>
<H2>Output</H2>
<p>
For each data set, print "<span>YES</span>" or "<span>NO</span>".
</p>
<H2>Sample Input</H2>
<pre>
3
4 3 5
4 3 6
8 8 8
</pre>
<H2>Output for the Sample Input</H2>
<pre>
YES
NO
NO
</pre>
|
3
4 3 5
4 3 6
8 8 8
|
YES
NO
NO
| 2,901
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.