CSES - Datatähti 2020 alku - Results
Submission details
Task:Ruudukko
Sender:Ugi
Submission time:2019-10-13 14:16:05 +0300
Language:Python3 (PyPy3)
Status:READY
Result:0
Feedback
groupverdictscore
#10
Test results
testverdicttime
#10.07 sdetails
#20.07 sdetails
#30.07 sdetails
#40.07 sdetails
#50.07 sdetails
#60.07 sdetails

Code

import itertools
li2 = []
for x in range(int(input())):
        li2.append(input())
for z in li2:
        li = z.split(" ")
        count = 0
        ma = len(li[1])
        for y in [int("".join(map(str,(i)))) for i in itertools.product([0, 1], repeat=ma)]:
                if int(li[0]) <= y and y <= int(li[1]):
                        count += 1
        print(count)
        

Test details

Test 1

Verdict:

input
1

correct output

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    li2.app...

Test 2

Verdict:

input
2

correct output
1 2 
2 1 

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    li2.app...

Test 3

Verdict:

input
5

correct output
1 2 3 4 5 
2 1 4 3 6 
3 4 1 2 7 
4 3 2 1 8 
5 6 7 8 1 

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    li2.app...

Test 4

Verdict:

input
42

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    li2.app...

Test 5

Verdict:

input
99

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    li2.app...

Test 6

Verdict:

input
100

correct output
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    li2.app...