CSES - HIIT Open 2019 - Results
Submission details
Task:Bit Strings
Sender:Agonaudid
Submission time:2019-05-25 12:12:46 +0300
Language:Python3
Status:READY
Result:
Test results
testverdicttime
#10.05 sdetails
#2ACCEPTED0.05 sdetails
#30.05 sdetails
#40.04 sdetails
#5ACCEPTED0.05 sdetails
#60.04 sdetails
#7ACCEPTED0.04 sdetails
#8ACCEPTED0.05 sdetails
#9ACCEPTED0.06 sdetails
#100.04 sdetails
#110.77 sdetails
#12--details
#13--details
#14--details
#15--details
#16--details
#17--details
#18--details

Code

from sys import stdin

for x in stdin:
	a, b = list(map(int, x.split()))
	print(2**a - ((a - b + 1)**2 - 1))
		
	 	

Test details

Test 1

Verdict:

input
1 1

correct output
1

user output
2

Test 2

Verdict: ACCEPTED

input
2 1

correct output
1

user output
1

Test 3

Verdict:

input
2 2

correct output
3

user output
4

Test 4

Verdict:

input
3 1

correct output
1

user output
0

Test 5

Verdict: ACCEPTED

input
3 2

correct output
5

user output
5

Test 6

Verdict:

input
3 3

correct output
7

user output
8

Test 7

Verdict: ACCEPTED

input
4 1

correct output
1

user output
1

Test 8

Verdict: ACCEPTED

input
4 2

correct output
8

user output
8

Test 9

Verdict: ACCEPTED

input
4 3

correct output
13

user output
13

Test 10

Verdict:

input
4 4

correct output
15

user output
16

Test 11

Verdict:

input
654321 123456

correct output
796245691

user output
176926485967940208024554640097...
Truncated

Test 12

Verdict:

input
1000000 1

correct output
1

user output
(empty)

Test 13

Verdict:

input
1000000 10

correct output
256933600

user output
(empty)

Test 14

Verdict:

input
1000000 100

correct output
142013415

user output
(empty)

Test 15

Verdict:

input
1000000 1000

correct output
899626120

user output
(empty)

Test 16

Verdict:

input
1000000 10000

correct output
374265948

user output
(empty)

Test 17

Verdict:

input
1000000 100000

correct output
388134512

user output
(empty)

Test 18

Verdict:

input
1000000 1000000

correct output
235042058

user output
(empty)