CSES - Datatähti 2020 alku - Results
Submission details
Task:Ruudukko
Sender:Ugi
Submission time:2019-10-13 14:11:08 +0300
Language: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().split(" "))
for z in li2:
        count = 0
        for y in [int("".join(map(str,(i)))) for i in itertools.product([0, 1], repeat=len(z[1]))]:
                if int(z[0]) <= y and y <= int(z[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.append(input().split(" "))
EOFError

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.append(input().split(" "))
EOFError

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.append(input().split(" "))
EOFError

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.append(input().split(" "))
EOFError

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.append(input().split(" "))
EOFError

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.append(input().split(" "))
EOFError