Task: | Neliöt |
Sender: | Metabolix |
Submission time: | 2020-11-06 18:17:52 +0200 |
Language: | Python3 (CPython3) |
Status: | READY |
Result: | 28 |
group | verdict | score |
---|---|---|
#1 | ACCEPTED | 28 |
#2 | TIME LIMIT EXCEEDED | 0 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | ACCEPTED | 0.02 s | 1, 2 | details |
#2 | ACCEPTED | 0.03 s | 1, 2 | details |
#3 | TIME LIMIT EXCEEDED | -- | 2 | details |
Code
#!/usr/bin/python t = int(input()) for _ in range(t): n = int(input()) y = False for a in range(0, int((n / 2) ** 0.5) + 1): b = (n - a**2) ** 0.5 if b == int(b): y = True break print("YES" if y else "NO")
Test details
Test 1
Group: 1, 2
Verdict: ACCEPTED
input |
---|
100 1 2 3 4 ... |
correct output |
---|
YES YES NO YES YES ... |
user output |
---|
YES YES NO YES YES ... Truncated |
Test 2
Group: 1, 2
Verdict: ACCEPTED
input |
---|
100 522 419 402 969 ... |
correct output |
---|
YES NO NO NO NO ... |
user output |
---|
YES NO NO NO NO ... Truncated |
Test 3
Group: 2
Verdict: TIME LIMIT EXCEEDED
input |
---|
100 575833539 744851460 436154655 655319365 ... |
correct output |
---|
NO NO NO NO NO ... |
user output |
---|
(empty) |