CSES - Datatähti 2022 alku - Results
Submission details
Task:Merkkijono (String)
Sender:eaittok
Submission time:2021-10-05 20:23:42
Language:PyPy3
Status:READY
Result:0
Feedback
groupverdictscore
#10
Test results
testverdicttime
#1ACCEPTED0.06 sdetails
#2ACCEPTED0.06 sdetails
#3ACCEPTED0.06 sdetails
#4ACCEPTED0.06 sdetails
#5ACCEPTED0.06 sdetails
#6ACCEPTED0.06 sdetails
#7ACCEPTED0.06 sdetails
#8ACCEPTED0.06 sdetails
#9ACCEPTED0.06 sdetails
#10ACCEPTED0.06 sdetails
#110.07 sdetails
#120.08 sdetails
#130.08 sdetails
#140.09 sdetails
#150.09 sdetails
#160.10 sdetails

Code

import string
def s(n, middle_index):
    if n == 1:
        return str(middle_index)
    return s(n-1, middle_index+1)+str(middle_index)+s(n-1, middle_index+1)
def conv(s):
    letters = string.ascii_lowercase
    return "".join([letters[int(i)] for i in s])
print(conv(s(int(input()), 0)))
"""
if __name__ == "__main__":
    for i in range(1, 16):
        print(conv(s(i, 0)))
"""

Test details

Test 1

Verdict: ACCEPTED

input
1

correct output
a

user output
a

Test 2

Verdict: ACCEPTED

input
2

correct output
bab

user output
bab

Test 3

Verdict: ACCEPTED

input
3

correct output
cbcacbc

user output
cbcacbc

Test 4

Verdict: ACCEPTED

input
4

correct output
dcdbdcdadcdbdcd

user output
dcdbdcdadcdbdcd

Test 5

Verdict: ACCEPTED

input
5

correct output
edecedebedecedeaedecedebedeced...

user output
edecedebedecedeaedecedebedeced...

Test 6

Verdict: ACCEPTED

input
6

correct output
fefdfefcfefdfefbfefdfefcfefdfe...

user output
fefdfefcfefdfefbfefdfefcfefdfe...

Test 7

Verdict: ACCEPTED

input
7

correct output
gfgegfgdgfgegfgcgfgegfgdgfgegf...

user output
gfgegfgdgfgegfgcgfgegfgdgfgegf...

Test 8

Verdict: ACCEPTED

input
8

correct output
hghfhghehghfhghdhghfhghehghfhg...

user output
hghfhghehghfhghdhghfhghehghfhg...

Test 9

Verdict: ACCEPTED

input
9

correct output
ihigihifihigihieihigihifihigih...

user output
ihigihifihigihieihigihifihigih...

Test 10

Verdict: ACCEPTED

input
10

correct output
jijhjijgjijhjijfjijhjijgjijhji...

user output
jijhjijgjijhjijfjijhjijgjijhji...

Test 11

Verdict:

input
11

correct output
kjkikjkhkjkikjkgkjkikjkhkjkikj...

user output
bajbaibajbahbajbaibajbagbajbai...

Test 12

Verdict:

input
12

correct output
lkljlklilkljlklhlkljlklilkljlk...

user output
bbbabbjbbbabbibbbabbjbbbabbhbb...

Test 13

Verdict:

input
13

correct output
mlmkmlmjmlmkmlmimlmkmlmjmlmkml...

user output
bcbbbcbabcbbbcjbcbbbcbabcbbbci...

Test 14

Verdict:

input
14

correct output
nmnlnmnknmnlnmnjnmnlnmnknmnlnm...

user output
bdbcbdbbbdbcbdbabdbcbdbbbdbcbd...

Test 15

Verdict:

input
15

correct output
onomonolonomonokonomonolonomon...

user output
bebdbebcbebdbebbbebdbebcbebdbe...

Test 16

Verdict:

input
16

correct output
popnpopmpopnpoplpopnpopmpopnpo...

user output
bfbebfbdbfbebfbcbfbebfbdbfbebf...