Task: | Fraktaali |
Sender: | _Serinaz_ |
Submission time: | 2017-10-11 11:12:30 +0300 |
Language: | Python3 |
Status: | READY |
Result: | 100 |
group | verdict | score |
---|---|---|
#1 | ACCEPTED | 10 |
#2 | ACCEPTED | 10 |
#3 | ACCEPTED | 10 |
#4 | ACCEPTED | 10 |
#5 | ACCEPTED | 10 |
#6 | ACCEPTED | 10 |
#7 | ACCEPTED | 10 |
#8 | ACCEPTED | 10 |
#9 | ACCEPTED | 10 |
#10 | ACCEPTED | 10 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | ACCEPTED | 0.11 s | 1 | details |
#2 | ACCEPTED | 0.10 s | 2 | details |
#3 | ACCEPTED | 0.12 s | 3 | details |
#4 | ACCEPTED | 0.13 s | 4 | details |
#5 | ACCEPTED | 0.09 s | 5 | details |
#6 | ACCEPTED | 0.09 s | 6 | details |
#7 | ACCEPTED | 0.11 s | 7 | details |
#8 | ACCEPTED | 0.11 s | 8 | details |
#9 | ACCEPTED | 0.10 s | 9 | details |
#10 | ACCEPTED | 0.14 s | 10 | details |
Code
#valkearuutu "." #mustaruutu "#" def transform(lista): jono = list(lista) #changes string to list for i in range(0, len(jono)): if jono[i] == "#": jono[i] = "." elif jono[i] == ".": jono[i] = "#" return ("".join(str(x) for x in jono)) # returns list changes to string taulukko = ["#"] taulukko2 = [] taulukko3 = [0,0,0,0] taulukko4 = [] taulukko5 = [] taulukko6 = [] taulukko7 = [] taulukko8 = [] taulukko9 = [] taulukko10 = [] taulukko2.append( 2*taulukko[0]) taulukko2.append(taulukko[0] + transform(taulukko[0])) taulukko3[0] = 2*taulukko2[0] taulukko3[1] = taulukko2[1]*2 taulukko3[2] = taulukko2[0] + transform(taulukko2[0]) taulukko3[3] = taulukko2[1] + transform(taulukko2[1]) for i in range(len(taulukko3)): taulukko4.append(taulukko3[i]*2) for i in range(len(taulukko3)): taulukko4.append(taulukko3[i] + transform(taulukko3[i])) for i in range(len(taulukko4)): #taulukko5 taulukko5.append(taulukko4[i]*2) for i in range(len(taulukko4)): taulukko5.append(taulukko4[i] + transform(taulukko4[i])) for i in range(len(taulukko5)): taulukko6.append(taulukko5[i]*2) #taulukko6 for i in range(len(taulukko5)): taulukko6.append(taulukko5[i] + transform(taulukko5[i])) for i in range(len(taulukko6)): taulukko7.append(taulukko6[i]*2) #taulukko7 for i in range(len(taulukko6)): taulukko7.append(taulukko6[i] + transform(taulukko6[i])) for i in range(len(taulukko7)): taulukko8.append(taulukko7[i]*2) #taulukko8 for i in range(len(taulukko7)): taulukko8.append(taulukko7[i] + transform(taulukko7[i])) for i in range(len(taulukko8)): taulukko9.append(taulukko8[i]*2) #taulukko9 for i in range(len(taulukko8)): taulukko9.append(taulukko8[i] + transform(taulukko8[i])) for i in range(len(taulukko9)): taulukko10.append(taulukko9[i]*2) #taulukko10 for i in range(len(taulukko9)): taulukko10.append(taulukko9[i] + transform(taulukko9[i])) n = input() square = [] if n == "1": square = taulukko elif n=="2": square = taulukko2 elif n == "3": square = taulukko3 elif n == "4": square = taulukko4 elif n == "5": square = taulukko5 elif n=="6": square = taulukko6 elif n=="7": square = taulukko7 elif n =="8": square = taulukko8 elif n=="9": square = taulukko9 elif n == "10": square = taulukko10 for var in square: print(var)
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: ACCEPTED
input |
---|
3 |
correct output |
---|
#### #.#. ##.. #..# |
user output |
---|
#### #.#. ##.. #..# |
Test 4
Group: 4
Verdict: ACCEPTED
input |
---|
4 |
correct output |
---|
######## #.#.#.#. ##..##.. #..##..# ####.... ... |
user output |
---|
######## #.#.#.#. ##..##.. #..##..# ####.... ... |
Test 5
Group: 5
Verdict: ACCEPTED
input |
---|
5 |
correct output |
---|
################ #.#.#.#.#.#.#.#. ##..##..##..##.. #..##..##..##..# ####....####.... ... |
user output |
---|
################ #.#.#.#.#.#.#.#. ##..##..##..##.. #..##..##..##..# ####....####.... ... |
Test 6
Group: 6
Verdict: ACCEPTED
input |
---|
6 |
correct output |
---|
##############################... |
user output |
---|
##############################... |
Test 7
Group: 7
Verdict: ACCEPTED
input |
---|
7 |
correct output |
---|
##############################... |
user output |
---|
##############################... |
Test 8
Group: 8
Verdict: ACCEPTED
input |
---|
8 |
correct output |
---|
##############################... |
user output |
---|
##############################... |
Test 9
Group: 9
Verdict: ACCEPTED
input |
---|
9 |
correct output |
---|
##############################... |
user output |
---|
##############################... |
Test 10
Group: 10
Verdict: ACCEPTED
input |
---|
10 |
correct output |
---|
##############################... |
user output |
---|
##############################... |