Task: | Fraktaali |
Sender: | Kurns |
Submission time: | 2017-10-03 21:44:07 +0300 |
Language: | Python3 |
Status: | READY |
Result: | 30 |
group | verdict | score |
---|---|---|
#1 | ACCEPTED | 10 |
#2 | ACCEPTED | 10 |
#3 | ACCEPTED | 10 |
#4 | WRONG ANSWER | 0 |
#5 | WRONG ANSWER | 0 |
#6 | WRONG ANSWER | 0 |
#7 | WRONG ANSWER | 0 |
#8 | WRONG ANSWER | 0 |
#9 | WRONG ANSWER | 0 |
#10 | WRONG ANSWER | 0 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | ACCEPTED | 0.07 s | 1 | details |
#2 | ACCEPTED | 0.08 s | 2 | details |
#3 | ACCEPTED | 0.06 s | 3 | details |
#4 | WRONG ANSWER | 0.07 s | 4 | details |
#5 | WRONG ANSWER | 0.06 s | 5 | details |
#6 | WRONG ANSWER | 0.09 s | 6 | details |
#7 | WRONG ANSWER | 0.06 s | 7 | details |
#8 | WRONG ANSWER | 0.08 s | 8 | details |
#9 | WRONG ANSWER | 0.08 s | 9 | details |
#10 | WRONG ANSWER | 0.06 s | 10 | details |
Code
import math userInput = int(input()) fraktaali = [] fraktaali.append("#") fraktaali.append("") fraktaali.append("") fraktaali.append("") fraktaali.append("") fraktaali.append("") fraktaali.append("") fraktaali.append("") fraktaali.append("") fraktaali.append("") def myReplace(uI): newString = "" for x in range(0, len(uI)): if uI[x] == "#": newString += "." else: newString += "#" return newString if userInput == 1: print(fraktaali[0]) fraktaali[1] += fraktaali[0] fraktaali[1] += fraktaali[0] fraktaali[1] += " " fraktaali[1] += fraktaali[0] fraktaali[1] += myReplace(fraktaali[0]) if userInput == 2: fraktaali[1] = "" fraktaali[1] += fraktaali[0] fraktaali[1] += fraktaali[0] fraktaali[1] += "\n" fraktaali[1] += fraktaali[0] fraktaali[1] += myReplace(fraktaali[0]) print(fraktaali[1]) fraktaali[2] += fraktaali[1].split()[0] fraktaali[2] += fraktaali[1].split()[0] fraktaali[2] += " " fraktaali[2] += fraktaali[1].split()[1] fraktaali[2] += fraktaali[1].split()[1] fraktaali[2] += " " fraktaali[2] += fraktaali[1].split()[0] fraktaali[2] += myReplace(fraktaali[1].split()[0]) fraktaali[2] += " " fraktaali[2] += fraktaali[1].split()[1] fraktaali[2] += myReplace(fraktaali[1].split()[1]) if userInput == 3: fraktaali[2] = "" fraktaali[2] += fraktaali[1].split()[0] fraktaali[2] += fraktaali[1].split()[0] fraktaali[2] += "\n" fraktaali[2] += fraktaali[1].split()[1] fraktaali[2] += fraktaali[1].split()[1] fraktaali[2] += "\n" fraktaali[2] += fraktaali[1].split()[0] fraktaali[2] += myReplace(fraktaali[1].split()[0]) fraktaali[2] += "\n" fraktaali[2] += fraktaali[1].split()[1] fraktaali[2] += myReplace(fraktaali[1].split()[1]) print(fraktaali[2]) #pituus = math.pow(2, userInput-1) #fraktaali[n] += #for x in range(2, 10): #fraktaali[x] = "" #fraktaali[x] += fraktaali[x-1] #fraktaali[x] += fraktaali[x-1] #fraktaali[x] += "\n" #fraktaali[x] += fraktaali[x-1] #fraktaali[x] += myReplace(fraktaali[x-1]) #fraktaali[x] += "\n" #if userInput == x: #print(fraktaali[x])
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: WRONG ANSWER
input |
---|
4 |
correct output |
---|
######## #.#.#.#. ##..##.. #..##..# ####.... ... |
user output |
---|
(empty) |
Test 5
Group: 5
Verdict: WRONG ANSWER
input |
---|
5 |
correct output |
---|
################ #.#.#.#.#.#.#.#. ##..##..##..##.. #..##..##..##..# ####....####.... ... |
user output |
---|
(empty) |
Test 6
Group: 6
Verdict: WRONG ANSWER
input |
---|
6 |
correct output |
---|
##############################... |
user output |
---|
(empty) |
Test 7
Group: 7
Verdict: WRONG ANSWER
input |
---|
7 |
correct output |
---|
##############################... |
user output |
---|
(empty) |
Test 8
Group: 8
Verdict: WRONG ANSWER
input |
---|
8 |
correct output |
---|
##############################... |
user output |
---|
(empty) |
Test 9
Group: 9
Verdict: WRONG ANSWER
input |
---|
9 |
correct output |
---|
##############################... |
user output |
---|
(empty) |
Test 10
Group: 10
Verdict: WRONG ANSWER
input |
---|
10 |
correct output |
---|
##############################... |
user output |
---|
(empty) |