CSES - Datatähti 2022 alku - Results
Submission details
Task:Merkkijono (String)
Sender:Theelevinr
Submission time:2021-10-14 09:26:13
Language:CPython3
Status:READY
Result:0
Feedback
groupverdictscore
#10
Test results
testverdicttime
#10.03 sdetails
#20.03 sdetails
#30.03 sdetails
#40.03 sdetails
#50.03 sdetails
#60.03 sdetails
#70.03 sdetails
#80.03 sdetails
#90.03 sdetails
#100.03 sdetails
#110.03 sdetails
#120.03 sdetails
#130.03 sdetails
#140.03 sdetails
#150.03 sdetails
#160.03 sdetails

Code

from functools import cache


@cache
def create_string(n):
    characters = "abcdefghijklmnopqrstuvwxyz"
    final_string = ""
    if n != 1:
        string = create_string(n-1)
        for i in string:
            final_string += characters[n-1]
            final_string += i
        final_string += characters[n-1]
        return final_string
    else:
        return "a"


n = int(input())
print(create_string(n))

Test details

Test 1

Verdict:

input
1

correct output
a

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    from functools import cache
ImportError: cannot import name 'cache'

Test 2

Verdict:

input
2

correct output
bab

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    from functools import cache
ImportError: cannot import name 'cache'

Test 3

Verdict:

input
3

correct output
cbcacbc

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    from functools import cache
ImportError: cannot import name 'cache'

Test 4

Verdict:

input
4

correct output
dcdbdcdadcdbdcd

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    from functools import cache
ImportError: cannot import name 'cache'

Test 5

Verdict:

input
5

correct output
edecedebedecedeaedecedebedeced...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    from functools import cache
ImportError: cannot import name 'cache'

Test 6

Verdict:

input
6

correct output
fefdfefcfefdfefbfefdfefcfefdfe...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    from functools import cache
ImportError: cannot import name 'cache'

Test 7

Verdict:

input
7

correct output
gfgegfgdgfgegfgcgfgegfgdgfgegf...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    from functools import cache
ImportError: cannot import name 'cache'

Test 8

Verdict:

input
8

correct output
hghfhghehghfhghdhghfhghehghfhg...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    from functools import cache
ImportError: cannot import name 'cache'

Test 9

Verdict:

input
9

correct output
ihigihifihigihieihigihifihigih...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    from functools import cache
ImportError: cannot import name 'cache'

Test 10

Verdict:

input
10

correct output
jijhjijgjijhjijfjijhjijgjijhji...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    from functools import cache
ImportError: cannot import name 'cache'

Test 11

Verdict:

input
11

correct output
kjkikjkhkjkikjkgkjkikjkhkjkikj...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    from functools import cache
ImportError: cannot import name 'cache'

Test 12

Verdict:

input
12

correct output
lkljlklilkljlklhlkljlklilkljlk...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    from functools import cache
ImportError: cannot import name 'cache'

Test 13

Verdict:

input
13

correct output
mlmkmlmjmlmkmlmimlmkmlmjmlmkml...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    from functools import cache
ImportError: cannot import name 'cache'

Test 14

Verdict:

input
14

correct output
nmnlnmnknmnlnmnjnmnlnmnknmnlnm...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    from functools import cache
ImportError: cannot import name 'cache'

Test 15

Verdict:

input
15

correct output
onomonolonomonokonomonolonomon...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    from functools import cache
ImportError: cannot import name 'cache'

Test 16

Verdict:

input
16

correct output
popnpopmpopnpoplpopnpopmpopnpo...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    from functools import cache
ImportError: cannot import name 'cache'