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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s183822835
|
p00002
|
u647694976
|
1554530338
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5592
| 135
|
def solve():
a,b=map(int,input().split())
print(len(str(a+b)))
while True:
try:
solve()
except:
break
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,502
|
s095974785
|
p00002
|
u761923615
|
1554425242
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5592
| 95
|
while True:
try:
a,b=list(map(int,input().split()))
print(len(str(a+b)))
except:
break
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,503
|
s706841482
|
p00002
|
u221424603
|
1554026957
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5584
| 125
|
while True:
try:
a,b=map(int,input().split())
a+=b
print(len(str(a)))
except:
break
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,504
|
s216272570
|
p00002
|
u763386533
|
1553796078
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5620
| 105
|
import sys
l=[[int(i) for i in l.split()] for l in sys.stdin]
for i in l:
print(len(str(i[0]+i[1])))
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,505
|
s736417934
|
p00002
|
u033958021
|
1553178768
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5604
| 143
|
import sys
for line in sys.stdin.readlines():
i = line.rstrip().split(' ')
j = int(i[0]) + int(i[1])
a = str(j)
print(len(a))
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,506
|
s223407129
|
p00002
|
u011810163
|
1552320985
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5604
| 254
|
while True:
try:
a, b = (int(x) for x in input().strip().split(' '))
sum = a + b
digit = 0
while sum >= 1 :
sum = sum / 10
digit += 1
print(digit)
except EOFError:
break
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,507
|
s217262849
|
p00002
|
u625806423
|
1551703746
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5584
| 107
|
while True:
try:
a, b = map(int,input().split())
except EOFError:
break
print(len(str(a+b)))
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,508
|
s907273944
|
p00002
|
u314832372
|
1551165336
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5596
| 191
|
for i in range(1, 200):
try:
str1 = input()
list = str1.split(" ")
result = len(str(int(list[0]) + int(list[1])))
print(result)
except:
break
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,509
|
s342044332
|
p00002
|
u990228206
|
1550820080
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5592
| 124
|
while True:
try:
n=list(map(int,input().split()))
print(len(str(sum(n))))
except:
break
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,510
|
s861616055
|
p00002
|
u811314383
|
1550814125
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5672
| 208
|
import math
while True:
try:
data = list(map(int,input().split()))
sum = data[0] + data[1]
sum_size = int (math.log10(sum) + 1)
print(sum_size)
except:
break;
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,511
|
s687829230
|
p00002
|
u431726425
|
1550673367
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5596
| 119
|
while True:
try:
a, b = [int(x) for x in input().split()]
print(len(str(a + b)))
except: break
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,512
|
s574057105
|
p00002
|
u195186080
|
1550657863
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5588
| 120
|
while True:
try:
a, b = map(int, input().split())
print(len(str(a+b)))
except:
exit(0)
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,513
|
s235123526
|
p00002
|
u733798831
|
1550489446
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5596
| 200
|
try:
while True:
a,b=[int(i) for i in input().split(" ")]
c=a+b
S=0
while c>0:
S+=1
c=int(c/10)
print(S)
except EOFError:
pass
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,514
|
s214629153
|
p00002
|
u689047545
|
1547010851
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5600
| 148
|
import sys
if __name__ == '__main__':
for line in sys.stdin:
a, b = map(int, line.split())
n = str(a + b)
print(len(n))
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,515
|
s090933844
|
p00002
|
u254455259
|
1546780717
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5588
| 161
|
while(1):
try:
a,b=map(int,input().split(" "))
sum=a+b
length=len(str(sum))
print(length)
except EOFError:
break
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,516
|
s382322099
|
p00002
|
u921810101
|
1544866824
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5608
| 101
|
import sys
for line in sys.stdin:
a, b = [int(x) for x in line.split()]
print(len(str(a+b)))
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,517
|
s043861810
|
p00002
|
u000163577
|
1544799666
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5592
| 144
|
while True:
try:
a,b = input().split()
a = int(a)
b = int(b)
print(len(str(a+b)))
except:
break
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,518
|
s756148668
|
p00002
|
u600395583
|
1543158517
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5592
| 125
|
while True:
try:
a,b = map(int,input().split())
print(len(str(a+b)))
except EOFError:
break
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,519
|
s803166829
|
p00002
|
u080014366
|
1543139681
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5600
| 157
|
while True:
try:
n=list(map(int, input().split()))
except EOFError:
break
a=n[0]+n[1]
for i in range(0,10):
if a/10**i<10:
print(i+1)
break
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,520
|
s285376915
|
p00002
|
u606639970
|
1542972266
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5608
| 160
|
import sys
for line in sys.stdin:
a, b = line.split()
a = int(a)
b = int(b)
c = a + b
cnt = 0
while c > 0:
c //= 10
cnt += 1
print(cnt)
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,521
|
s381502478
|
p00002
|
u573115711
|
1542854355
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5604
| 102
|
import sys
for line in sys.stdin:
a, b = line.strip().split(" ")
print(len(str(int(a)+int(b))))
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,522
|
s163266048
|
p00002
|
u067299340
|
1542009517
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5596
| 137
|
while True:
try:
a, b = [int(i) for i in input().split()]
print(len(str(a + b)))
except EOFError:
break
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,523
|
s327306897
|
p00002
|
u717526540
|
1541575176
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5604
| 182
|
ans = []
while(1):
try:
a, b = map(int, input().split())
except:
break
s = str(a + b)
cnt = len(s)
ans.append(cnt)
for a in ans:
print(a)
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,524
|
s282257786
|
p00002
|
u379340960
|
1539902338
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5616
| 183
|
from sys import stdin
for a in stdin :
b = a.strip().split()
b = sum([int(i) for i in b])
c = 1
while int(b/10) > 0:
b = int(b/10)
c += 1
print(c)
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,525
|
s193967408
|
p00002
|
u317583692
|
1539520553
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5596
| 286
|
while True:
try:
a, b = map(int,input().split())
sum = a + b
i = 0
while i >= 0:
c = 10**i
if sum % c == sum:
break
else:
i += 1
print(i)
except EOFError:
break
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,526
|
s756853672
|
p00002
|
u495607670
|
1539357144
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5588
| 165
|
while True:
try:
a, b = list(map(int, input().split()))
print(len(str(a+b)))
except EOFError:
break
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,527
|
s273941863
|
p00002
|
u373127758
|
1539135390
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5604
| 106
|
import sys
for line in sys.stdin:
ar = line.split(" ")
print(len(str(int(ar[0]) + int(ar[1]))))
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,528
|
s918426053
|
p00002
|
u657361950
|
1539046042
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5588
| 92
|
while True:
try:
a,b=map(int,input().split())
print(len(str(a+b)))
except:
break
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,529
|
s066561816
|
p00002
|
u007749073
|
1537224874
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5584
| 115
|
while True:
try:
print(len(str(sum(map(int, input().split(' '))))))
except EOFError:
break
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,530
|
s269129225
|
p00002
|
u219940997
|
1537189357
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5584
| 91
|
while 1:
try: print(len(str(sum(list(map(int, input().split()))))))
except: break
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,531
|
s231378203
|
p00002
|
u186297440
|
1536162397
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5596
| 143
|
while True:
try:
list1 = [int(i) for i in input().split()]
print(len(str(list1[0] + list1[1])))
except:
break;
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,532
|
s556594889
|
p00002
|
u634668646
|
1533981230
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5600
| 274
|
def keta(num):
counter = 0
while(1):
num = num/10
counter += 1
if(num<1):
break
return counter
while(1):
try:
a,b = map(int, input().split())
num=a+b
print(keta(num))
except:
break
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,533
|
s929584763
|
p00002
|
u319725914
|
1533908663
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5608
| 106
|
import sys
for line in sys.stdin:
a,b = line.split()
a,b = int(a),int(b)
print(len(str(a+b)))
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,534
|
s772175046
|
p00002
|
u938878704
|
1533103332
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5612
| 195
|
ans = []
while True :
try :
s = input()
a, b = map(int, s.split())
ans.append(len(str(a + b)))
except :
for a in ans :
print(a)
break
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,535
|
s618664032
|
p00002
|
u896746547
|
1533091914
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5588
| 104
|
while True:
try: a,b = map(int,input().split())
except EOFError: break
print(len(str(a+b)))
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,536
|
s472000044
|
p00002
|
u252700163
|
1532609647
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5584
| 105
|
while True:
try:
print(len(str(sum(list(map(int,input().split()))))))
except EOFError:
break
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,537
|
s922305920
|
p00002
|
u930302179
|
1532257892
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5660
| 149
|
from math import log10, ceil
while True:
try:
a=[int(item) for item in input().split()]
b=a[0]+a[1]
print(len(str(b)))
except EOFError:break
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,538
|
s110778003
|
p00002
|
u853158149
|
1521961651
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5588
| 110
|
while True:
try:
a,b = map(int,input().split(" "))
print(len(str(a+b)))
except: break
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,539
|
s675283418
|
p00002
|
u214781794
|
1478012379
|
Python
|
Python3
|
py
|
Accepted
| 30
|
7668
| 121
|
while True:
try:
x, y = map(int, input().split());
print (len(str(x + y)))
except:
break
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,540
|
s032410732
|
p00002
|
u079141094
|
1467208895
|
Python
|
Python3
|
py
|
Accepted
| 20
|
7520
| 221
|
sss = input().split()
while sss:
a,b = int(sss[0]), int(sss[1])
ab = a + b
c = 1
while ab // 10 > 0:
c += 1
ab //= 10
print(c)
try: sss = input().split()
except EOFError: break
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,541
|
s858324799
|
p00002
|
u822200871
|
1448108088
|
Python
|
Python3
|
py
|
Accepted
| 20
|
7656
| 184
|
output = []
while True:
try :
a,b = map(int, input().split())
except :
break
output.append(len(str(a+b)))
for x in range(len(output)):
print(output[x])
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,542
|
s487931499
|
p00002
|
u197615660
|
1372063636
|
Python
|
Python
|
py
|
Accepted
| 10
|
4392
| 145
|
import math
while True:
try:
data = map(int, raw_input().split())
[a, b] = data
print int(math.log10(a+b)+1)
except (EOFError):
break
|
p00002
|
<H1>Digit Number</H1>
<p>
Write a program which computes the digit number of sum of two integers <var>a</var> and <var>b</var>.
</p>
<H2>Input</H2>
<p>
There are several test cases. Each test case consists of two non-negative integers <var>a</var> and <i>b</i> which are separeted by a space in a line. The input terminates with EOF.
</p>
<h2>Constraints</h2>
<ul>
<li>0 ≤ <var>a</var>, <var>b</var> ≤ 1,000,000</li>
<li>The number of datasets ≤ 200</li>
</ul>
<H2>Output</H2>
<p>
Print the number of digits of <var>a</var> + <var>b</var> for each data set.
</p>
<H2>Sample Input</H2>
<pre>
5 7
1 99
1000 999
</pre>
<H2>Output for the Sample Input</H2>
<pre>
2
3
4
</pre>
|
5 7
1 99
1000 999
|
2
3
4
| 2,543
|
s257278998
|
p00003
|
u539753516
|
1531568674
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5592
| 166
|
for i in range(int(input())):
a,b,c=map(lambda x:int(x)**2,input().split())
if a+b==c or b+c==a or c+a==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,544
|
s004493480
|
p00003
|
u525366883
|
1535372447
|
Python
|
Python
|
py
|
Accepted
| 10
|
4644
| 199
|
n = int(raw_input())
for i in range(n):
num = map(int, raw_input().split())
num.sort(reverse=True)
if num[0]**2 == num[1]**2 + num[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,545
|
s901631192
|
p00003
|
u923573620
|
1535597774
|
Python
|
Python3
|
py
|
Accepted
| 50
|
5664
| 258
|
import math
N = int(input())
for i in range(N):
side_len = list(map(int, input().split(" ")))
side_len.sort()
if int(math.pow(side_len[0], 2)) + int(math.pow(side_len[1], 2)) == int(math.pow(side_len[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,546
|
s801064352
|
p00003
|
u179046735
|
1555657346
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5600
| 132
|
n=int(input())
for _ in range(n):
a,b,c=sorted([int(i) for i in input().split()])
print("YES" if c**2==a**2+b**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,547
|
s752121389
|
p00003
|
u831725332
|
1555815176
|
Python
|
Python3
|
py
|
Accepted
| 50
|
5600
| 190
|
N = int(input())
for i in range(N):
sides = sorted(list(map(int, input().split())))
if sides[0]**2 + sides[1]**2 == sides[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,548
|
s810221166
|
p00003
|
u831725332
|
1555815503
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5596
| 245
|
N = int(input())
for i in range(N):
adjacent_side_1, adjacent_side_2, hypotenuse = sorted(list(map(int, input().split())))
if adjacent_side_1**2 + adjacent_side_2**2 == hypotenuse**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,549
|
s873769277
|
p00003
|
u563307622
|
1556440679
|
Python
|
Python3
|
py
|
Accepted
| 50
|
5596
| 237
|
n = input()
for i in range(int(n)):
a,b,c = list(map(int,input().split()))
a,b,c = int(a),int(b),int(c)
if a**2 + b**2 == c**2 or c**2 + a**2 == b**2 or b**2 + c**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,550
|
s514366881
|
p00003
|
u936370024
|
1556806182
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5596
| 206
|
n = int(input())
for _ in range(n):
a,b,c = list(map(int,input().split()))
if a**2 + b**2 == c**2 or c**2 + b**2 == a**2 or a**2 + c**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,551
|
s747133819
|
p00003
|
u990459103
|
1558945934
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5596
| 189
|
n=int(input())
for i in range(n):
p=list(map(int,input().split()))
p.sort()
a=p[0]
b=p[1]
c=p[2]
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,552
|
s690189198
|
p00003
|
u990459103
|
1558946018
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5600
| 211
|
n=int(input())
for i in range(n):
p=list(map(int,input().split(" ")))
p.sort()
a=p[0]
b=p[1]
c=p[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,553
|
s397519238
|
p00003
|
u990459103
|
1558946049
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5592
| 187
|
n=int(input())
for i in range(n):
p=list(map(int,input().split(" ")))
p.sort()
if pow(p[0],2) + pow(p[1],2) == pow(p[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,554
|
s030294328
|
p00003
|
u990459103
|
1558946061
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5596
| 187
|
n=int(input())
for i in range(n):
p=list(map(int,input().split(" ")))
p.sort()
if pow(p[0],2) + pow(p[1],2) == pow(p[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,555
|
s860834432
|
p00003
|
u990459103
|
1558949386
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5600
| 236
|
n=int(input())
for i in range(n):
a,b,c = input().split()
x = int(a)
y = int(b)
z = int(c)
p = [x,y,z]
p.sort()
if pow(p[0],2) + pow(p[1],2) == pow(p[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,556
|
s272385438
|
p00003
|
u990459103
|
1558949887
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5600
| 236
|
n=int(input())
for i in range(n):
a,b,c = input().split()
x = int(a)
y = int(b)
z = int(c)
p = [x,y,z]
p.sort()
if pow(p[0],2) + pow(p[1],2) == pow(p[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,557
|
s995901239
|
p00003
|
u477023447
|
1558951536
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5592
| 187
|
n=int(input())
for i in range(n):
p=list(map(int,input().split(" ")))
p.sort()
if pow(p[0],2) + pow(p[1],2) == pow(p[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,558
|
s007953478
|
p00003
|
u477023447
|
1558952162
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5592
| 291
|
n = int(input())
for i in range(n):
tri_list = list(map(int,input().split(" ")))
#tri_list = input().split(" ")
tri_list.sort()
a = int(tri_list[2]) ** 2
b = int(tri_list[0]) ** 2 + int(tri_list[1]) ** 2
if a == 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,559
|
s161177046
|
p00003
|
u990459103
|
1558952809
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5596
| 236
|
n=int(input())
for i in range(n):
a,b,c = input().split()
x = int(a)
y = int(b)
z = int(c)
p = [x,y,z]
p.sort()
if pow(p[0],2) + pow(p[1],2) == pow(p[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,560
|
s051363988
|
p00003
|
u477023447
|
1558953559
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5596
| 256
|
n = int(input())
for i in range(n):
tri_list = list(map(int,input().split(" ")))
tri_list.sort()
a = int(tri_list[2]) ** 2
b = int(tri_list[0]) ** 2 + int(tri_list[1]) ** 2
if a == 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,561
|
s126417528
|
p00003
|
u477023447
|
1558953712
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5600
| 256
|
n = int(input())
for i in range(n):
tri_list = list(map(int,input().split(" ")))
tri_list.sort()
a = int(tri_list[2]) ** 2
b = int(tri_list[0]) ** 2 + int(tri_list[1]) ** 2
if a == 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,562
|
s844733620
|
p00003
|
u051394180
|
1558957907
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5608
| 215
|
# -*- coding: utf-8 -*-
for i in range(int(input())):
values = sorted(map(lambda x: int(x)**2, input().split(' ')))
if values[2] == values[1] + values[0]:
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,563
|
s809942704
|
p00003
|
u051394180
|
1558958173
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5604
| 215
|
# -*- coding: utf-8 -*-
for i in range(int(input())):
values = sorted(map(lambda x: int(x)**2, input().split(' ')))
if values[2] == values[1] + values[0]:
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,564
|
s192596255
|
p00003
|
u247705495
|
1559444223
|
Python
|
Python3
|
py
|
Accepted
| 40
|
5592
| 191
|
N = int(input())
for i in range(N):
a = list(map(int, input().split()))
a.sort()
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,565
|
s255965765
|
p00003
|
u804558166
|
1559540464
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5592
| 193
|
n = int(input())
for i in range(n):
x, y, z =map(int, input().split())
if x*x + y*y == z*z or y*y + z*z == x*x or x*x + z*z == y*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,566
|
s350427727
|
p00003
|
u063179562
|
1406724191
|
Python
|
Python3
|
py
|
Accepted
| 40
|
6724
| 131
|
n = int(input())
for i in range(0, n):
a, b, c = sorted(map(int, input().split()))
print("YES" if c*c == a*a+b*b 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,567
|
s542299599
|
p00003
|
u450407555
|
1409273250
|
Python
|
Python
|
py
|
Accepted
| 20
|
4196
| 152
|
n = int(raw_input())
for _ in xrange(n):
ls = sorted(map(int, raw_input().split()))
if ls[2]**2 == ls[0]**2+ls[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,568
|
s323146988
|
p00003
|
u696166817
|
1409381100
|
Python
|
Python3
|
py
|
Accepted
| 40
|
6720
| 256
|
n = int(input())
for i in range(0, n):
a, b, c = sorted(map(int, input().strip("\n").split(" ")))
# a,b,c = sorted(input().strip("\n").split(" "))
#print(a, b, c)
if c*c - (a*a + b*b) == 0:
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,569
|
s387529505
|
p00003
|
u579833671
|
1410763981
|
Python
|
Python
|
py
|
Accepted
| 20
|
4216
| 182
|
n = input()
for i in range(n):
l = map(int, raw_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,570
|
s689810329
|
p00003
|
u703446356
|
1410892269
|
Python
|
Python
|
py
|
Accepted
| 20
|
4212
| 274
|
rep = input()
while rep:
rep -= 1
[a, b, c] = map(int, raw_input().split())
if b < a and c < a:
a **= 2
b = b ** 2 + c ** 2
elif a < b and c < b:
a = a ** 2 + c ** 2
b **= 2
else:
a = a ** 2 + b ** 2
b = c ** 2
if a == 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,571
|
s810433694
|
p00003
|
u615353970
|
1411274466
|
Python
|
Python
|
py
|
Accepted
| 20
|
4200
| 202
|
n = raw_input()
while 1:
try :
a = map(int,raw_input().split())
a.sort()
a.reverse()
# print a
if a[0]**2 == a[1]**2 + a[2]**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,572
|
s118011009
|
p00003
|
u855866586
|
1411306922
|
Python
|
Python
|
py
|
Accepted
| 40
|
4384
| 306
|
import itertools
def check(a,b,c):
for p in itertools.permutations([a,b,c]):
(x,y,z)=p
if x*x+y*y==z*z:
return True
return False
n=input()
for i in range(n):
(a,b,c)=map(eval,raw_input().split())
if check(a,b,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,573
|
s616008384
|
p00003
|
u907094926
|
1413639332
|
Python
|
Python
|
py
|
Accepted
| 20
|
4260
| 516
|
n = int(raw_input())
for i in range(n):
edge = map(int,raw_input().split(" "))
e0 = edge[0] * edge[0]
e1 = edge[1] * edge[1]
e2 = edge[2] * edge[2]
ret = "NO"
if (edge[0] > edge[1]) and (edge[0] > edge[2]):
if (e0 - e1 - e2) == 0:
ret = "YES"
if (edge[1] > edge[0]) and (edge[1] > edge[2]):
if (e1 - e0 - e2) == 0:
ret = "YES"
if (edge[2] > edge[0]) and (edge[2] > edge[1]):
if (e2 - e0 - e1) == 0:
ret = "YES"
print ret
|
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,574
|
s357286310
|
p00003
|
u125577958
|
1414662617
|
Python
|
Python3
|
py
|
Accepted
| 30
|
6716
| 331
|
n=int(input())#nはデータセットの数
for i in range(n):#n回繰り返す
edge=input().split()#入力
edge=[int(j) for j in edge]#入力
edge.sort()#ここでedge[2]が最大になる
if(edge[0]**2+edge[1]**2==edge[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,575
|
s198383691
|
p00003
|
u607831289
|
1416019825
|
Python
|
Python
|
py
|
Accepted
| 20
|
4196
| 183
|
import sys
N = int(raw_input())
for line in sys.stdin:
a, b, c = sorted(map(int, line.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,576
|
s624725426
|
p00003
|
u506132575
|
1416096510
|
Python
|
Python
|
py
|
Accepted
| 20
|
4288
| 244
|
#!/usr/bin/python
#-coding:utf-8-
import sys
data_list = []
for s in sys.stdin:
data_list.append( map(int,s.split()) )
for e in data_list[1:]:
e.sort()
if e[0]*e[0] + e[1]*e[1] == e[2] * e[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,577
|
s175630788
|
p00003
|
u310737167
|
1416676669
|
Python
|
Python3
|
py
|
Accepted
| 40
|
6788
| 150
|
import math
import itertools
for i in range(int(input())):
a, b, c = sorted(map(int, input().split()))
print('YES' if a*a+b*b==c*c 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,578
|
s281317515
|
p00003
|
u379499530
|
1418052140
|
Python
|
Python
|
py
|
Accepted
| 10
|
4212
| 156
|
n = input()
for i in range(n):
s = map(int, raw_input().split())
s.sort()
if s[2]**2 == (s[0]**2) + (s[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,579
|
s196157452
|
p00003
|
u578674365
|
1418719921
|
Python
|
Python
|
py
|
Accepted
| 30
|
4228
| 270
|
import sys
data_list = sys.stdin.readlines()
data_length = int(data_list.pop(0))
for x in xrange(data_length):
lines = map(int, data_list[x].strip().split())
lines.sort(reverse = True)
if lines[0]**2 == (lines[1]**2 + lines[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,580
|
s671139398
|
p00003
|
u846356981
|
1418781093
|
Python
|
Python3
|
py
|
Accepted
| 40
|
6724
| 312
|
# coding: utf-8
# Here your code !
N = int(input())
for i in range(N):
a,b,c = map(int, input().split())
flg = 0
if a*a + b*b == c*c:
flg = 1
if c*c + a*a == b*b:
flg = 1
if b*b + c*c == a*a:
flg = 1
if flg == 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,581
|
s218549800
|
p00003
|
u672822075
|
1418962089
|
Python
|
Python3
|
py
|
Accepted
| 50
|
6720
| 132
|
for _ in range(int(input())):
a=list(map(int,input().split()))
a.sort()
print("YES") if a[0]**2+a[1]**2==a[2]**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,582
|
s077755895
|
p00003
|
u631118941
|
1419335592
|
Python
|
Python
|
py
|
Accepted
| 20
|
4304
| 299
|
def pascal(xdata):
for x in xrange(3):
for y in xrange(3):
for z in xrange(3):
if xdata[x]**2 + xdata[y]**2 == xdata[z]**2:
return True
return False
N = input()
data = [map(int, raw_input().split()) for x in range(N)]
for x in data:
if pascal(x):
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,583
|
s499399251
|
p00003
|
u422939201
|
1419347194
|
Python
|
Python
|
py
|
Accepted
| 20
|
4196
| 220
|
#condig: UTF-8
import sys
n = int(raw_input())
while True:
try :
a = sorted(map(int,raw_input().split()))
print "YES" if a[0] ** 2 + a[1] ** 2 == a[2] ** 2 else "NO"
except:
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,584
|
s697457483
|
p00003
|
u342537066
|
1420703538
|
Python
|
Python3
|
py
|
Accepted
| 50
|
6720
| 333
|
n=int(input())
while n:
n-=1
lis=list(map(int,input().split()))
for i in range(3):
for j in range(i+1,3):
if lis[i]<lis[j]:
a=lis[i]
lis[i]=lis[j]
lis[j]=a
c,a,b=lis
if 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,585
|
s494970630
|
p00003
|
u342537066
|
1420703901
|
Python
|
Python3
|
py
|
Accepted
| 40
|
6720
| 210
|
n=int(input())
for i in range(n):
edge=input().split()
edge=[int(j) for j in edge]
edge.sort()
if edge[2]**2==edge[0]**2+edge[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,586
|
s840377102
|
p00003
|
u989992553
|
1420879120
|
Python
|
Python
|
py
|
Accepted
| 20
|
4236
| 580
|
def check_right_triangle(side1, side2, side3):
pow = 2
if side1**pow == side2**pow + side3**pow:
return True
if side2**pow == side3**pow + side1**pow:
return True
if side3**pow == side1**pow + side2**pow:
return True
return False
def check():
for i in range(int(raw_input())):
sides = map(int, raw_input().split())
if check_right_triangle(sides[0], sides[1], sides[2]):
print "YES"
else:
print "NO"
if __name__ == "__main__":
check()
# print check_right_triangle(4, 3, 5)
# print check_right_triangle(4, 3, 6)
# print check_right_triangle(8, 8, 8)
|
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,587
|
s042988887
|
p00003
|
u336443042
|
1421682029
|
Python
|
Python
|
py
|
Accepted
| 20
|
4236
| 267
|
import sys
raw_input()
for line in sys.stdin.readlines():
a, b, c = map(int, line.strip().split())
input_list = [a, b, c]
input_list.sort()
if input_list[2] ** 2 == input_list[0] ** 2 + input_list[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,588
|
s300401860
|
p00003
|
u567380442
|
1422530287
|
Python
|
Python3
|
py
|
Accepted
| 40
|
6724
| 180
|
import sys
n = int(sys.stdin.readline())
for _ in range(n):
a, b, c = sorted(list(map(int, sys.stdin.readline().split())))
print('YES' if a * a + b * b == c * c 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,589
|
s490463940
|
p00003
|
u241133982
|
1422946566
|
Python
|
Python
|
py
|
Accepted
| 20
|
4224
| 217
|
N = input()
for i in range(N):
a, b, c = map(int, raw_input().split())
t1 = a**2 + b ** 2 == c ** 2
t2 = b**2 + c ** 2 == a ** 2
t3 = c**2 + a ** 2 == b ** 2
if t1 or t2 or t3:
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,590
|
s408322804
|
p00003
|
u839573768
|
1422953052
|
Python
|
Python
|
py
|
Accepted
| 20
|
4384
| 357
|
import math
n = input()
for i in range(n):
flag = 0
a = map(int, raw_input().split())
if(pow(a[0],2)+pow(a[1],2) == pow(a[2],2)):
flag = 1
if(pow(a[1],2)+pow(a[2],2) == pow(a[0],2)):
flag = 1
if(pow(a[2],2)+pow(a[0],2) == pow(a[1],2)):
flag = 1
if flag == 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,591
|
s869030402
|
p00003
|
u442472098
|
1423219755
|
Python
|
Python3
|
py
|
Accepted
| 50
|
6728
| 291
|
#!/usr/bin/env python3
def right_triangle(edge):
# a < b < c
return (edge[0] ** 2 + edge[1] ** 2 == edge[2] ** 2)
n = int(input())
for i in range(n):
edge = sorted([int(x) for x in input().split()])
if right_triangle(edge):
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,592
|
s560416599
|
p00003
|
u442472098
|
1423219850
|
Python
|
Python3
|
py
|
Accepted
| 40
|
6720
| 291
|
#!/usr/bin/env python3
def right_triangle(edge):
# a < b < c
return (edge[0] ** 2 + edge[1] ** 2 == edge[2] ** 2)
n = int(input())
for i in range(n):
edge = sorted([int(x) for x in input().split()])
if right_triangle(edge):
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,593
|
s820178989
|
p00003
|
u879226672
|
1423264140
|
Python
|
Python
|
py
|
Accepted
| 20
|
4216
| 187
|
n = int(raw_input())
for k in range(n):
[a,b,c] = map(int,raw_input().split())
a,b,c = sorted([a,b,c])
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,594
|
s174777316
|
p00003
|
u744114948
|
1423633397
|
Python
|
Python3
|
py
|
Accepted
| 50
|
6724
| 196
|
#! /usr/bin/python3
a=int(input())
for i in range(a):
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,595
|
s238277205
|
p00003
|
u349293999
|
1423835025
|
Python
|
Python
|
py
|
Accepted
| 20
|
4220
| 299
|
# coding: UTF-8
n = input()
for n in range(n):
inputs = map(int,raw_input().split())
if inputs[0]**2 == inputs[1]**2 + inputs[2]**2 or\
inputs[1]**2 == inputs[0]**2 + inputs[2]**2 or\
inputs[2]**2 == inputs[0]**2 + inputs[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,596
|
s036748899
|
p00003
|
u392445270
|
1424414650
|
Python
|
Python
|
py
|
Accepted
| 20
|
4216
| 197
|
n = int(raw_input())
for i in range(n):
temp = [int(x) for x in raw_input().split()]
temp.sort(reverse = True)
if temp[0] ** 2 == temp[1] ** 2 + temp[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,597
|
s534893219
|
p00003
|
u492556875
|
1424732365
|
Python
|
Python3
|
py
|
Accepted
| 40
|
6720
| 241
|
import sys
n = int(sys.stdin.readline())
for i in range(n):
sides = [int(k) for k in sys.stdin.readline().split()]
sides.sort()
if sides[0] ** 2 + sides[1] ** 2 == sides[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,598
|
s661247221
|
p00003
|
u540744789
|
1425552334
|
Python
|
Python
|
py
|
Accepted
| 20
|
4216
| 169
|
for i in range(input()):
x=raw_input()
L=map(int,x.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,599
|
s100348117
|
p00003
|
u040533857
|
1425970312
|
Python
|
Python3
|
py
|
Accepted
| 50
|
6720
| 201
|
count=int(input())
for i in range(0, count):
a = map(int, input().split(' '))
a = [j**2 for j in a]
a.sort()
if (a[0] + a[1] == 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,600
|
s928280286
|
p00003
|
u355726239
|
1426736651
|
Python
|
Python3
|
py
|
Accepted
| 40
|
6724
| 224
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
n = int(input())
for i in range(n):
x = list(map(int, input().split()))
x.sort()
if x[0]**2 + x[1]**2 == x[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,601
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.