| Task: | Ruudukko |
| Sender: | ossikoo |
| Submission time: | 2019-10-10 14:38:57 +0300 |
| Language: | Python3 (CPython3) |
| Status: | READY |
| Result: | 0 |
| group | verdict | score |
|---|---|---|
| #1 | RUNTIME ERROR | 0 |
| test | verdict | time | |
|---|---|---|---|
| #1 | RUNTIME ERROR | 0.02 s | details |
| #2 | RUNTIME ERROR | 0.02 s | details |
| #3 | RUNTIME ERROR | 0.02 s | details |
| #4 | RUNTIME ERROR | 0.02 s | details |
| #5 | RUNTIME ERROR | 0.02 s | details |
| #6 | RUNTIME ERROR | 0.02 s | details |
Code
def generate_empty_grid(n):
grid = []
for row in range(0, n):
grid.insert(row, [0] * n)
return grid
def get_int(n_col, n_offset, n):
v = n_col + n_offset + 1
if v > n:
return v - n
else:
return v
def get_new_offset(cur_offset, n):
new_offset = cur_offset + 1
if new_offset > n:
new_offset = 0
return new_offset
def main(n):
grid = generate_empty_grid(n)
n_offset = 0
for n_row, row in enumerate(grid):
for n_col in range(0, len(row)):
v = get_int(n_col, n_offset, n)
row[n_col] = v
print(v, end = ' ')
n_offset = get_new_offset(n_offset, n)
print("\n", end = '')
main(input())Test details
Test 1
Verdict: RUNTIME ERROR
| input |
|---|
| 1 |
| correct output |
|---|
| 1 |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "input/code.py", line 32, in <module>
main(i...Test 2
Verdict: RUNTIME ERROR
| input |
|---|
| 2 |
| correct output |
|---|
| 1 2 2 1 |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "input/code.py", line 32, in <module>
main(i...Test 3
Verdict: RUNTIME ERROR
| input |
|---|
| 5 |
| correct output |
|---|
| 1 2 3 4 5 2 1 4 3 6 3 4 1 2 7 4 3 2 1 8 5 6 7 8 1 |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "input/code.py", line 32, in <module>
main(i...Test 4
Verdict: RUNTIME ERROR
| input |
|---|
| 42 |
| correct output |
|---|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "input/code.py", line 32, in <module>
main(i...Test 5
Verdict: RUNTIME ERROR
| input |
|---|
| 99 |
| correct output |
|---|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "input/code.py", line 32, in <module>
main(i...Test 6
Verdict: RUNTIME ERROR
| input |
|---|
| 100 |
| correct output |
|---|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "input/code.py", line 32, in <module>
main(i...