Task: | Fraktaali |
Sender: | soap |
Submission time: | 2017-10-02 03:05:00 +0300 |
Language: | Python3 |
Status: | READY |
Result: | 20 |
group | verdict | score |
---|---|---|
#1 | ACCEPTED | 10 |
#2 | ACCEPTED | 10 |
#3 | RUNTIME ERROR | 0 |
#4 | RUNTIME ERROR | 0 |
#5 | RUNTIME ERROR | 0 |
#6 | RUNTIME ERROR | 0 |
#7 | RUNTIME ERROR | 0 |
#8 | RUNTIME ERROR | 0 |
#9 | RUNTIME ERROR | 0 |
#10 | RUNTIME ERROR | 0 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | ACCEPTED | 0.06 s | 1 | details |
#2 | ACCEPTED | 0.07 s | 2 | details |
#3 | RUNTIME ERROR | 0.07 s | 3 | details |
#4 | RUNTIME ERROR | 0.09 s | 4 | details |
#5 | RUNTIME ERROR | 0.07 s | 5 | details |
#6 | RUNTIME ERROR | 0.06 s | 6 | details |
#7 | RUNTIME ERROR | 0.07 s | 7 | details |
#8 | RUNTIME ERROR | 0.07 s | 8 | details |
#9 | RUNTIME ERROR | 0.07 s | 9 | details |
#10 | RUNTIME ERROR | 0.07 s | 10 | details |
Code
frac = [[0 for x in range(2)] for y in range(2)] frac[1][1] = 1 def main(): count = input() if(count == "1"): print("#") return if(count == "2"): print_frac(frac) return print_frac(gen_frac(count)) def print_frac(frac): for row in frac: for val in row: print(str(val).replace('1','.').replace('0', '#'), end='') print() def gen_frac(c): g_size = 2**c #gridsize inv_frac = invert_frac(frac) for x in range(0, g_size/2-1): pass def invert_frac(frac): for x in range(len(frac)): for y in range(len(frac)): frac[x][y] = 1-frac[x][y] return frac main()
Test details
Test 1
Group: 1
Verdict: ACCEPTED
input |
---|
1 |
correct output |
---|
# |
user output |
---|
# |
Test 2
Group: 2
Verdict: ACCEPTED
input |
---|
2 |
correct output |
---|
## #. |
user output |
---|
## #. |
Test 3
Group: 3
Verdict: RUNTIME ERROR
input |
---|
3 |
correct output |
---|
#### #.#. ##.. #..# |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 39, in <module> main() File "input/code.py", line 14, in main print_frac(gen_frac(count)) File "input/code.py", line 23, in gen_frac g_size = 2**c #gridsize TypeError: unsupported operand type(s) for ** or pow(): 'int' and 'str'
Test 4
Group: 4
Verdict: RUNTIME ERROR
input |
---|
4 |
correct output |
---|
######## #.#.#.#. ##..##.. #..##..# ####.... ... |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 39, in <module> main() File "input/code.py", line 14, in main print_frac(gen_frac(count)) File "input/code.py", line 23, in gen_frac g_size = 2**c #gridsize TypeError: unsupported operand type(s) for ** or pow(): 'int' and 'str'
Test 5
Group: 5
Verdict: RUNTIME ERROR
input |
---|
5 |
correct output |
---|
################ #.#.#.#.#.#.#.#. ##..##..##..##.. #..##..##..##..# ####....####.... ... |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 39, in <module> main() File "input/code.py", line 14, in main print_frac(gen_frac(count)) File "input/code.py", line 23, in gen_frac g_size = 2**c #gridsize TypeError: unsupported operand type(s) for ** or pow(): 'int' and 'str'
Test 6
Group: 6
Verdict: RUNTIME ERROR
input |
---|
6 |
correct output |
---|
##############################... |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 39, in <module> main() File "input/code.py", line 14, in main print_frac(gen_frac(count)) File "input/code.py", line 23, in gen_frac g_size = 2**c #gridsize TypeError: unsupported operand type(s) for ** or pow(): 'int' and 'str'
Test 7
Group: 7
Verdict: RUNTIME ERROR
input |
---|
7 |
correct output |
---|
##############################... |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 39, in <module> main() File "input/code.py", line 14, in main print_frac(gen_frac(count)) File "input/code.py", line 23, in gen_frac g_size = 2**c #gridsize TypeError: unsupported operand type(s) for ** or pow(): 'int' and 'str'
Test 8
Group: 8
Verdict: RUNTIME ERROR
input |
---|
8 |
correct output |
---|
##############################... |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 39, in <module> main() File "input/code.py", line 14, in main print_frac(gen_frac(count)) File "input/code.py", line 23, in gen_frac g_size = 2**c #gridsize TypeError: unsupported operand type(s) for ** or pow(): 'int' and 'str'
Test 9
Group: 9
Verdict: RUNTIME ERROR
input |
---|
9 |
correct output |
---|
##############################... |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 39, in <module> main() File "input/code.py", line 14, in main print_frac(gen_frac(count)) File "input/code.py", line 23, in gen_frac g_size = 2**c #gridsize TypeError: unsupported operand type(s) for ** or pow(): 'int' and 'str'
Test 10
Group: 10
Verdict: RUNTIME ERROR
input |
---|
10 |
correct output |
---|
##############################... |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 39, in <module> main() File "input/code.py", line 14, in main print_frac(gen_frac(count)) File "input/code.py", line 23, in gen_frac g_size = 2**c #gridsize TypeError: unsupported operand type(s) for ** or pow(): 'int' and 'str'