Task: | Spiraali |
Sender: | severi |
Submission time: | 2021-10-17 13:01:42 +0300 |
Language: | Python3 (PyPy3) |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | RUNTIME ERROR | 0 |
#2 | RUNTIME ERROR | 0 |
#3 | WRONG ANSWER | 0 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | RUNTIME ERROR | 0.07 s | 1 | details |
#2 | RUNTIME ERROR | 0.08 s | 2 | details |
#3 | WRONG ANSWER | 0.08 s | 3 | details |
Code
njat = input().split(" ") n = int(njat[0]) t = int(njat[1]) i = 0 kordinaatit = [] while i < t: kordinaatit.append(input()) i += 1 layers = round(n / 2 + 0.1) i = 0 ruudukko = n * n while i < t: y = int(kordinaatit[i][0]) x = int(kordinaatit[i][2]) k = n + 1 - x s = n + 1 - y layer = x i += 1 if y < x: layer = y if s < layer: layer = s if k < layer: layer = k inner = n - (2 * (layer - 1)) ekaruutu = ruudukko - inner * inner + 1 if x == layer: vastaus = y - layer + ekaruutu elif s == layer: vastaus = x - layer + ekaruutu + inner - 1 elif y == layer: vastaus = ekaruutu + inner + inner + inner - 3 + k - layer else: vastaus = ekaruutu + inner + inner - 2 + s - layer print(vastaus)
Test details
Test 1
Group: 1
Verdict: RUNTIME ERROR
input |
---|
10 100 1 1 1 2 1 3 1 4 ... |
correct output |
---|
1 36 35 34 33 ... |
user output |
---|
1 36 35 34 33 ... Truncated |
Error:
Traceback (most recent call last): File "input/code.py", line 22, in <module> x = in...
Test 2
Group: 2
Verdict: RUNTIME ERROR
input |
---|
1000 1000 371 263 915 322 946 880 53 738 ... |
correct output |
---|
773533 312166 206053 200080 593922 ... |
user output |
---|
3 15941 19904 |
Error:
Traceback (most recent call last): File "input/code.py", line 22, in <module> x = in...
Test 3
Group: 3
Verdict: WRONG ANSWER
input |
---|
1000000000 1000 177757853 827347032 409613589 419171337 739269360 256524697 328695530 896842209 ... |
correct output |
---|
571375684522141210 967321186816598569 762879105851175000 370065046779516790 936897883750373771 ... |
user output |
---|
3999999991 15999999932 27999999803 11999999960 11999999964 ... Truncated |