ZhenlongDai/ACPR huggingface dataset:
Problem: p02417
Buggy submission (Python3, verdict: Wrong Answer):
import sys

Target = "".join(sys.stdin.readlines())
for i in range(26):
    print(chr(i + 97), ":", Target.count(chr(i + 97)))

Failing test case input:
Vgrh ti ` eoq-

Expected output:
a : 0
b : 0
c : 0
d : 0
e : 1
f : 0
g : 1
h : 1
i : 1
j : 0
k : 0
l : 0
m : 0
n : 0
o : 1
p : 0
q : 1
r : 1
s : 0
t : 1
u : 0
v : 1
w : 0
x : 0
y : 0
z : 0


Actual output:
a : 0
b : 0
c : 0
d : 0
e : 1
f : 0
g : 1
h : 1
i : 1
j : 0
k : 0
l : 0
m : 0
n : 0
o : 1
p : 0
q : 1
r : 1
s : 0
t : 1
u : 0
v : 0
w : 0
x : 0
y : 0
z : 0


Fixed submission (verdict: Accepted):
import sys

Target = ""
for line in sys.stdin:
    Target += line
for i in range(26):
    print(chr(i + 97), ":", Target.lower().count(chr(i + 97)))

Problem: p02417
Buggy submission (Python3, verdict: Wrong Answer):
alphabetTable = dict.fromkeys([chr(i) for i in range(97, 123)], 0)

text = input()

for i in range(len(text)):
    if text[i] in alphabetTable:
        alphabetTable[text[i]] += 1

sortedTable = sorted(alphabetTable.keys())
for r in sortedTable:
    print(r,':',alphabetTable[r])

Failing test case input:
lhYd wi W p*es

Expected output:
a : 0
b : 0
c : 0
d : 1
e : 1
f : 0
g : 0
h : 1
i : 1
j : 0
k : 0
l : 1
m : 0
n : 0
o : 0
p : 1
q : 0
r : 0
s : 1
t : 0
u : 0
v : 0
w : 2
x : 0
y : 1
z : 0


Actual output:
a : 0
b : 0
c : 0
d : 1
e : 1
f : 0
g : 0
h : 1
i : 1
j : 0
k : 0
l : 1
m : 0
n : 0
o : 0
p : 1
q : 0
r : 0
s : 1
t : 0
u : 0
v : 0
w : 1
x : 0
y : 0
z : 0


Fixed submission (verdict: Accepted):
alphabetTable = dict.fromkeys([chr(i) for i in range(97, 123)], 0)

while True:
    try:
        for text in input():
            for i in range(len(text)):
                if text[i].lower() in alphabetTable:
                    alphabetTable[text[i].lower()] += 1
    except EOFError:
        break

for r in sorted(alphabetTable):
    print(r,':',alphabetTable[r])

Problem: p02417
Buggy submission (Python3, verdict: Wrong Answer):
import sys
s = ''
for line in sys.stdin:
    s += line
s.lower()

dic = {}
orda = ord("a")
ordz = ord("z")

for c in s:
    if orda <= ord(c) <= ordz:
        try:
            dic[c] += 1
        except:
            dic[c] = 1

for i in range(orda,ordz + 1):
    c = chr(i)
    try:
        print("%s : %d" % (c, dic[c]))
    except:
        print("%s : %d" % (c, 0))

Failing test case input:
dXhl iw T re*o

Expected output:
a : 0
b : 0
c : 0
d : 1
e : 1
f : 0
g : 0
h : 1
i : 1
j : 0
k : 0
l : 1
m : 0
n : 0
o : 1
p : 0
q : 0
r : 1
s : 0
t : 1
u : 0
v : 0
w : 1
x : 1
y : 0
z : 0


Actual output:
a : 0
b : 0
c : 0
d : 1
e : 1
f : 0
g : 0
h : 1
i : 1
j : 0
k : 0
l : 1
m : 0
n : 0
o : 1
p : 0
q : 0
r : 1
s : 0
t : 0
u : 0
v : 0
w : 1
x : 0
y : 0
z : 0


Fixed submission (verdict: Accepted):
s = ""
while True:
    try:
        s += input().lower()
    except:
        break

dic = {}
orda = ord("a")
ordz = ord("z")

for c in s:
    if orda <= ord(c) <= ordz:
        try:
            dic[c] += 1
        except:
            dic[c] = 1

for i in range(orda,ordz + 1):
    c = chr(i)
    try:
        print("%s : %d" % (c, dic[c]))
    except:
        print("%s : %d" % (c, 0))
Problem: p02417
Buggy submission (Python3, verdict: Wrong Answer):
alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k',
			'l', 'm', 'n', 'o', 'p', 'r', 's', 't', 'u', 'v', 'w',
			'x', 'y', 'z']

dic = {}
for c in alphabet:
	dic[c] = 0

string = list(input().rstrip().lower())

for c in string:
	if c in alphabet:
		dic[c] = dic[c] + 1

for key in dic:
	print('{} : {}'.format(key, dic[key]))


Failing test case input:
dXhl hx R rd)o

Expected output:
a : 0
b : 0
c : 0
d : 2
e : 0
f : 0
g : 0
h : 2
i : 0
j : 0
k : 0
l : 1
m : 0
n : 0
o : 1
p : 0
q : 0
r : 2
s : 0
t : 0
u : 0
v : 0
w : 0
x : 2
y : 0
z : 0


Actual output:
a : 0
b : 0
c : 0
d : 2
e : 0
f : 0
g : 0
h : 2
i : 0
j : 0
k : 0
l : 1
m : 0
n : 0
o : 1
p : 0
r : 2
s : 0
t : 0
u : 0
v : 0
w : 0
x : 2
y : 0
z : 0


Fixed submission (verdict: Accepted):
alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k',
			'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
			'w','x', 'y', 'z']

dic = {}
for c in alphabet:
	dic[c] = 0

while True:
	try:
		string = list(input().rstrip().lower())
	except EOFError:
		break

	for c in string:
		if c in alphabet:
			dic[c] = dic[c] + 1

for key in dic:
	print('{} : {}'.format(key, dic[key]))
Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())

print(a+b%24)

Failing test case input:
405 14

Expected output:
11


Actual output:
419


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())

print((a+b)%24)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
print(eval(input().replace(' ','+')+'%24'))

Failing test case input:
170 4

Expected output:
6


Actual output:
174


Fixed submission (verdict: Accepted):
print(eval('('+input().replace(' ','+')+')%24'))

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = list(map(int, input().split()))
n=s[0]
k=s[1]
print((n+k))
        

Failing test case input:
52 2

Expected output:
6


Actual output:
54


Fixed submission (verdict: Accepted):
s = list(map(int, input().split()))
n=s[0]
k=s[1]
print((n+k)%24)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int,input().split())
print(a+b%24)

Failing test case input:
62 -1

Expected output:
13


Actual output:
85


Fixed submission (verdict: Accepted):
a, b = map(int,input().split())
print((a+b)%24)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B=map(int,input().split())
print(A+B)

Failing test case input:
82 1

Expected output:
11


Actual output:
83


Fixed submission (verdict: Accepted):
A,B=map(int,input().split())
print((A+B)%24)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B=map(int,input().split())
print(int(A+B/24))

Failing test case input:
79 0

Expected output:
7


Actual output:
79


Fixed submission (verdict: Accepted):
A,B=map(int,input().split())
print(int((A+B)%24))

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
print(a + b)

Failing test case input:
112 1

Expected output:
17


Actual output:
113


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
print((a+b)%24)

Problem: p03773
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
A,B = map(int,input().split())
print(A+B % 24)

Failing test case input:
54 3

Expected output:
9


Actual output:
57


Fixed submission (verdict: Accepted):
A,B = map(int,input().split())
print((A+B) % 24)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
print((a+b+12)%24)

Failing test case input:
541 1

Expected output:
14


Actual output:
2


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
print((a+b+12-12)%24)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
print(a+b%24)

Failing test case input:
349 4

Expected output:
17


Actual output:
353


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
print((a+b)%24)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
print(a+b % 24)

Failing test case input:
405 14

Expected output:
11


Actual output:
419


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
print((a+b) % 24)
Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int,input().split())
print((a+b)%12)

Failing test case input:
112 1

Expected output:
17


Actual output:
5


Fixed submission (verdict: Accepted):
a, b = map(int,input().split())
print((a+b)%24)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int,input().split())
print(a+b)

Failing test case input:
62 -1

Expected output:
13


Actual output:
61


Fixed submission (verdict: Accepted):
a,b = map(int,input().split())
print((a+b)%24)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int, input().split())
print((a+b)%24,":00")

Failing test case input:
82 1

Expected output:
11


Actual output:
11 :00


Fixed submission (verdict: Accepted):
a,b = map(int, input().split())
print((a+b)%24)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int,(input().split()))
print(a+b%24)


Failing test case input:
405 14

Expected output:
11


Actual output:
419


Fixed submission (verdict: Accepted):
a,b = map(int,(input().split()))
print((a+b)%24)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B = map(int,input().split())

print(A + B % 24)

Failing test case input:
31 -1

Expected output:
6


Actual output:
54


Fixed submission (verdict: Accepted):
A, B = map(int,input().split())

print((A + B) % 24)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):



a, b = map(int, input().split())
print((a + b) % 23)


Failing test case input:
54 3

Expected output:
9


Actual output:
11


Fixed submission (verdict: Accepted):



a, b = map(int, input().split())
print((a + b) % 24)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int,input().split())
if a + b > 24:
    print(a + b - 24)
else:
    print(a + b)

Failing test case input:
79 0

Expected output:
7


Actual output:
55


Fixed submission (verdict: Accepted):
a,b = map(int,input().split())
if a + b >= 24:
    print((a + b) % 24)
else:
    print(a + b)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

if __name__ == '__main__':
    a = [int(i) for i in input().split()]
    print(a[0]+a[1] %24)

Failing test case input:
112 1

Expected output:
17


Actual output:
113


Fixed submission (verdict: Accepted):
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

if __name__ == '__main__':
    a = [int(i) for i in input().split()]
    print((a[0]+a[1] )%24)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

A, B = map(int, input().split())
print("%d" % (A+B%24))


Failing test case input:
52 2

Expected output:
6


Actual output:
54


Fixed submission (verdict: Accepted):

A, B = map(int, input().split())
print("%d" % ((A+B)%24))
Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int,(input().split()))
print(a%24+b)


Failing test case input:
405 14

Expected output:
11


Actual output:
35


Fixed submission (verdict: Accepted):
a,b = map(int,(input().split()))
print((a+b)%24)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def read_int_list():
    return list(int(i) for i in input().split())
x,y = read_int_list()
print((x+y)%12)

Failing test case input:
62 -1

Expected output:
13


Actual output:
1


Fixed submission (verdict: Accepted):
def read_int_list():
    return list(int(i) for i in input().split())
    
x,y = read_int_list()
print((x+y)%24)

Problem: p03773
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b = map(int,input().split())
if a+b > 24:
    print((a+b)-24)
else:
    print(a+b)

Failing test case input:
62 -1

Expected output:
13


Actual output:
37


Fixed submission (verdict: Accepted):
a,b = map(int,input().split())
if a+b >= 24:
    print((a+b)%24)
else:
    print(a+b)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B=map(int,input().split())
ans=(A+B)
print(ans)


Failing test case input:
31 -1

Expected output:
6


Actual output:
30


Fixed submission (verdict: Accepted):
A,B=map(int,input().split())
ans=(A+B)%24
print(ans)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B = map(int, input().split())

ans = A + B % 24

print(ans)

Failing test case input:
112 1

Expected output:
17


Actual output:
113


Fixed submission (verdict: Accepted):
A, B = map(int, input().split())

ans = (A + B) % 24

print(ans)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
print(a+b%24)

Failing test case input:
52 2

Expected output:
6


Actual output:
54


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
print((a+b)%24)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int,input().split())
print((a+b)%24+1)

Failing test case input:
79 0

Expected output:
7


Actual output:
8


Fixed submission (verdict: Accepted):
a,b = map(int,input().split())
print((a+b)%24)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B = map(int, input().split())
print(A+B -24 if A+B > 24 else A+B)

Failing test case input:
349 4

Expected output:
17


Actual output:
329


Fixed submission (verdict: Accepted):
A, B = map(int, input().split())
print(A+B -24*((A+B)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
print(a%23+b)


Failing test case input:
79 0

Expected output:
7


Actual output:
10


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
print((a+b)%24)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int, input().split())
print(a+b)

Failing test case input:
82 1

Expected output:
11


Actual output:
83


Fixed submission (verdict: Accepted):
a,b=map(int, input().split())
print((a+b)%24)
Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
print(a+b)

Failing test case input:
349 4

Expected output:
17


Actual output:
353


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
print((a+b)%24)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def r_t(n):
    return sum(map(int, n.split()))%24
r_t(input())

Failing test case input:
79 0

Expected output:
7


Actual output:

Fixed submission (verdict: Accepted):
def r_t(n):
    return sum(map(int, n.split()))%24
print(r_t(input()))

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())

print(a % 24 + b)

Failing test case input:
349 14

Expected output:
3


Actual output:
27


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())

print((a + b) % 24)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
print((a%23)+b)


Failing test case input:
62 -1

Expected output:
13


Actual output:
15


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
print((a+b)%24)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
print((a+b)/24)

Failing test case input:
54 3

Expected output:
9


Actual output:
2.375


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
print((a+b)%24)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
lines = str(input()).split(' ')
A = int(lines[0])
B = int(lines[1])

if A + B > 24:
	print(A + B - 24)
else:
	print(A + B)


Failing test case input:
170 2

Expected output:
4


Actual output:
148


Fixed submission (verdict: Accepted):
lines = str(input()).split(' ')
A = int(lines[0])
B = int(lines[1])

now = A + B

while now >= 24:
	now -= 24

print(now)

Problem: p03773
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
a,b = list(map(int, input().split()))

res = (a+b)%24

Failing test case input:
349 4

Expected output:
17


Actual output:

Fixed submission (verdict: Accepted):
a,b = list(map(int, input().split()))
res = (a+b)%24
print(res)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def coder(a,b):
    if a + b < 24:
        return a + b
    else:
        return a + b % 24

def main():
    a , b = map(int, input().split())
    print(coder(a , b))

if __name__ == '__main__':
    main()

Failing test case input:
275 4

Expected output:
15


Actual output:
279


Fixed submission (verdict: Accepted):
def coder(a,b):
    if a + b < 24:
        return a + b
    else:
        return ((a + b) % 24)

def main():
    a , b = map(int, input().split())
    print(coder(a , b))

if __name__ == '__main__':
    main()

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

A, B = map(int, input().split())


print(A + (B % 24))

Failing test case input:
170 2

Expected output:
4


Actual output:
172


Fixed submission (verdict: Accepted):
A, B = map(int, input().split())


print((A + B) % 24)
Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B = map(int, input().split())


print((A % 24) + B)

Failing test case input:
405 14

Expected output:
11


Actual output:
35


Fixed submission (verdict: Accepted):
A,B = map(int, input().split())


print((A + B) % 24)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
print(a+b if a+b<= 24 else (a+b) - 24)

Failing test case input:
62 -1

Expected output:
13


Actual output:
37


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
print(a+b if a+b < 24 else (a+b)%24)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int, input().split())
print(str((a+b)%24)+":00")

Failing test case input:
62 -1

Expected output:
13


Actual output:
13:00


Fixed submission (verdict: Accepted):
a,b = map(int, input().split())
print((a+b)%24)

Problem: p03773
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
print(eval(input().replace(' ','+')))

Failing test case input:
349 4

Expected output:
17


Actual output:
353


Fixed submission (verdict: Accepted):
print(eval(input().replace(' ','+'))%24)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, K = list(map(int, input().split()))
print(N+K%24)

Failing test case input:
54 3

Expected output:
9


Actual output:
57


Fixed submission (verdict: Accepted):
N, K = list(map(int, input().split()))
print((N+K)%24)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B=map(int,input().split())
print((A+B)%2)

Failing test case input:
52 2

Expected output:
6


Actual output:
0


Fixed submission (verdict: Accepted):
A,B=map(int,input().split())
print((A+B)%24)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
print(eval(input().replace(" ","+"))%12)

Failing test case input:
112 1

Expected output:
17


Actual output:
5


Fixed submission (verdict: Accepted):
print(eval(input().replace(" ","+"))%24)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
a = sys.stdin.readline()
a,b = a.strip().split(" ")
print((int(a)-int(b))/24)

Failing test case input:
82 1

Expected output:
11


Actual output:
3.375


Fixed submission (verdict: Accepted):
import sys
a = sys.stdin.readline()
a,b = a.strip().split(" ")
print((int(a)+int(b))%24)

Problem: p03773
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
A,B = map(int,input().split())
print(A+B)

Failing test case input:
62 -1

Expected output:
13


Actual output:
61


Fixed submission (verdict: Accepted):
A,B = map(int,input().split())
print((A+B)%24)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
print(a + b % 24)

Failing test case input:
170 4

Expected output:
6


Actual output:
174


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
print((a + b) % 24)
Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x,y = map(int,input().split())
if (x+y)<=23:
    print((x+y)%24)
else:
    print(x+y)


Failing test case input:
275 4

Expected output:
15


Actual output:
279


Fixed submission (verdict: Accepted):
x,y = map(int,input().split())
if (x+y)>=23:
    print((x+y)%24)
else:
    print(x+y)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

import sys

for line in sys.stdin.readlines():
    a = line.strip().split(" ")
    a1 = int(a[0])
    a2 = int(a[1])
    print(a1+a2 % 24)

Failing test case input:
54 3

Expected output:
9


Actual output:
57


Fixed submission (verdict: Accepted):

import sys

for line in sys.stdin.readlines():
    a = line.strip().split(" ")
    a1 = int(a[0])
    a2 = int(a[1])
    print((a1+a2) % 24)

Problem: p03773
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a, b = map(int,input().split())
print(a + b)

Failing test case input:
62 -1

Expected output:
13


Actual output:
61


Fixed submission (verdict: Accepted):
a , b = map(int,input().split())
print(( a + b ) % 24)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def ri(): return int(input())
def rli(): return list(map(int, input().split()))
def ris(): return list(input())
def pli(a): return "".join(list(map(str, a)))

a,b = rli()
print(a+b%24)

Failing test case input:
112 2

Expected output:
18


Actual output:
114


Fixed submission (verdict: Accepted):
def ri(): return int(input())
def rli(): return list(map(int, input().split()))
def ris(): return list(input())
def pli(a): return "".join(list(map(str, a)))
 
a,b = rli()
print((a+b)%24)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
print(a+b)

Failing test case input:
82 1

Expected output:
11


Actual output:
83


Fixed submission (verdict: Accepted):
a, b = map(int, input().split(" "))
print((a+b)%24)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
r=a+b
if r<=24:
    print(r)
else:
    print(r-24)

Failing test case input:
349 8

Expected output:
21


Actual output:
333


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
r=a+b
if r<24:
    print(r)
else:
    print(r%24)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
print(eval(input().replace(' ','+')+"%24"))

Failing test case input:
82 1

Expected output:
11


Actual output:
83


Fixed submission (verdict: Accepted):
print(eval(input().replace(' ','+'))%24)

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


a, b = map(int,input().split())

print(a + b)

Failing test case input:
45 -2

Expected output:
19


Actual output:
43


Fixed submission (verdict: Accepted):


a, b = map(int,input().split())

print((a+b) % 24)
Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):



def main():
    a, b = [int(e) for e in input().split()]
    answer = (a + b) % 23
    return answer


print(main())


Failing test case input:
349 14

Expected output:
3


Actual output:
18


Fixed submission (verdict: Accepted):



def main():
    a, b = [int(e) for e in input().split()]
    answer = (a + b) % 24
    return answer


print(main())

Problem: p03773
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = list(map(int, input().split()))
print(int((a[0] + a[1]) / 24))

Failing test case input:
45 -2

Expected output:
19


Actual output:
1


Fixed submission (verdict: Accepted):
a = list(map(int, input().split()))
print(int((a[0] + a[1]) % 24))

Problem: p03773
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n,m = map(int,input().split())

print((n+m%24))

Failing test case input:
349 4

Expected output:
17


Actual output:
353


Fixed submission (verdict: Accepted):
n,m = map(int,input().split())

print((n+m)%24)
Problem: p02793
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import fractions
from functools import reduce
def lcm_base(x, y):
    return (x * y) 

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

N = int(input())
A = list(map(int, input().split()))

lcm_A = lcm_list(A)
B = [None]*N
for i in range(N):
    B[i] = lcm_A
print(1)


Failing test case input:
3
1000100 999999 1014329

Expected output:
857397275


Actual output:
1


Fixed submission (verdict: Accepted):
import fractions
import functools
import sys

def lcm_base(x, y):
    return (x * y) 

def lcm(*numbers):
    return functools.reduce(lcm_base, numbers, 1)

N = int(sys.stdin.readline())
A = list(map(int, sys.stdin.readline().split()))

lcm_A = functools.reduce(lcm_base, A, 1)
B = [None]*N
B = [lcm_A


print(sum(B)%(10**9+7))

Problem: p02793
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import fractions
mod=10**9+7
def lcm(a,b):
    return a*b


n=int(input())
A=list(map(int,input().split()))
x=1
for i in range(n):
    x=lcm(x,A[i])
ans=0
for i in range(n):
    ans+=(x*pow(A[i],mod-2,mod))%mod
print(ans)

Failing test case input:
5
11 12 12 24 12

Expected output:
101


Actual output:
174528


Fixed submission (verdict: Accepted):
from fractions import gcd

def lcm(a,b):
    return a*(b

mod=10**9+7

n=int(input())
A=list(map(int,input().split()))

L=A[0]
for i in range(1,n):
    L=lcm(L,A[i])
L%=mod

coef=sum(pow(x,mod-2,mod) for x in A)
print(L*coef%mod)

Problem: p02793
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import fractions

N = int(input())
A = list(map(int,input().split()))
MOD = 10** 9
lcm = 1
for a in A:
    lcm = a 

ans = 0
for a in A:
    ans += lcm 

print(ans%MOD)

Failing test case input:
5
11 34 12 1 5

Expected output:
15749


Actual output:
25


Fixed submission (verdict: Accepted):
import fractions

N = int(input())
A = list(map(int,input().split()))
MOD = 10** 9 + 7
lcm = 1
for a in A:
    lcm = a 

print(sum(lcm

Problem: p02793
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(map(int,input().split()))
mod = 10**9+7

import fractions
from functools import reduce

def gcd(x,y):
  if x == 0:
    return y
  else:
    return gcd(x%y,x)
 

def lcm(x, y):
    return (x*y)
    
l = 1
B = 0

for i in range(N):
  l = lcm(l,A[i])
for i in range(N):
  B += l
B %= mod

print(B)

Failing test case input:
5
11 12 12 12 12

Expected output:
56


Actual output:
1140480


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int,input().split()))
mod = 10**9+7

import fractions
from functools import reduce

def gcd(x,y):
  if x == 0:
    return y
  else:
    return gcd(y-x*(y
 

def lcm(x, y):
    return (x*y)
    
l = 1
B = 0

for i in range(N):
  l = lcm(l,A[i])
for i in range(N):
  B += l
B %= mod

print(B)
Problem: p02793
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import fractions
from functools import reduce
def lcm_base(x, y):
    return (x * y) 

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

N = int(input())
A = list(map(int, input().split()))

lcm_A = lcm_list(A)
print(1)


Failing test case input:
3
1001000 1225154 1792869

Expected output:
668030847


Actual output:
1


Fixed submission (verdict: Accepted):
import fractions
import functools
import sys

def lcm_base(x, y):
    return (x * y) 

def lcm(*numbers):
    return functools.reduce(lcm_base, numbers, 1)

N = int(sys.stdin.readline())
A = list(map(int, sys.stdin.readline().split()))

lcm_A = functools.reduce(lcm_base, A, 1)
B = [None]*N
B = [lcm_A


print(sum(B)%(10**9+7))

Problem: p02793
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
arr = list(map(int,input().split()))

N = pow(10,9)+7
def gcd(a,b):
    if a>b:return gcd(b,a)
    while b!=0:
        nb = b%a
        a = b
        b = nb
    return a

def lcm(a,b):
    tmp =  (a*b)/gcd(a,b)
    return tmp

hcm = arr[0]
for i in range(1,n):
    hcm = lcm(hcm,arr[i])

res = 0
for num in arr:
    res += (hcm/num)
    res%=N

print(int(res))
    

    


Failing test case input:
3
1000000 999999 285777

Expected output:
616967029


Actual output:
13113319


Fixed submission (verdict: Accepted):
n = int(input())
arr = list(map(int,input().split()))

N = pow(10,9)+7
def gcd(a,b):
    if a==0:return b
    return gcd(b%a,a)

def lcm(a,b):
    tmp =  (a*b)
    return tmp

hcm = arr[0]
for i in range(1,n):
    hcm = lcm(hcm,arr[i])

res = 0
for num in arr:
    res += (hcm
    

print(res%N)

Problem: p02793
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import sys
sys.setrecursionlimit(4100000)
import math




N = int(input())


import fractions
a = list(map(int, input().split()))
koubai = a[0]
for i in range(1, N):
    koubai = koubai * a[i] 
    if(koubai >=1000000000000007):
        break

ans = int(0)
for i in range(N):
    ans += koubai 
    
ans %= 1000000007

print(ans)

Failing test case input:
3
1000000 1225154 1792869

Expected output:
281795164


Actual output:
350647162


Fixed submission (verdict: Accepted):
import sys
sys.setrecursionlimit(4100000)
import math




N = int(input())


import fractions
a = list(map(int, input().split()))
koubai = a[0]
small = []
for i in range(0, N
    small.append(a[2*i + 1] * a[2*i] 

small.append(a[-1])
for i in range(len(small)):
    koubai = koubai * small[i] 


ans = int(0)
for i in range(N):
    ans += koubai 
    
ans %= 1000000007

print(ans)
Problem: p03564
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
K = int(input())
p = 1
ct = 0
while(p < K and ct <= N):
    p *= 2
    ct += 1
print(p + (max(0, N-ct) * K))


Failing test case input:
4
-10

Expected output:
-76


Actual output:
-39


Fixed submission (verdict: Accepted):
N = int(input())
K = int(input())
p = 1
ct = 0
while(ct < N):
    p = min(2*p, p+K)
    ct += 1
print(p)

Problem: p03564
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N = int(input())
K = int(input())
for i in range(N):
    N = min(2*N,N+K)
print(N)

Failing test case input:
4
-12

Expected output:
-92


Actual output:
-80


Fixed submission (verdict: Accepted):
N = int(input())
K = int(input())
k = 1
for i in range(N):
    k = min(2*k,k+K)
print(k)

Problem: p03564
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N = int(input())
K = int(input())

ans = 1
for i in range(N):
    if ans < K:
        ans *= 2
    else:
        ans += 2
print(ans)



Failing test case input:
10
12

Expected output:
88


Actual output:
28


Fixed submission (verdict: Accepted):
N = int(input())
K = int(input())
 
ans = 1
for i in range(N):
    if ans < K:
        ans *= 2
    else:
        ans += K
print(ans)

Problem: p03564
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,k=[int(input()) for _ in range(2)]
ans=1
for i in range(1,n+1):
  if i>=k:
    ans+=k
  else:
    ans*=2
print(ans)

Failing test case input:
4
-8

Expected output:
-60


Actual output:
-31


Fixed submission (verdict: Accepted):
n,k=[int(input()) for _ in range(2)]
ans=1
for i in range(n):
  ans=min(ans*2,ans+k)
print(ans)

Problem: p03564
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


def main():
    N = int(input())
    K = int(input())
    
    ans = 1
    while ans <= K:
        ans = ans * 2
        N = N - 1
    for _ in range(N):
        ans = ans + K
    print(ans)

if __name__ == '__main__':
    main()


Failing test case input:
10
-9

Expected output:
-4352


Actual output:
-89


Fixed submission (verdict: Accepted):


def main():
    N = int(input())
    K = int(input())
    
    ans = 1
    for _ in range(N):
        tmp1 = ans * 2
        tmp2 = ans + K
        if tmp1 > tmp2:
            ans = tmp2
        else:
            ans = tmp1
    print(ans)

if __name__ == '__main__':
    main()

Problem: p03564
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n = int(input())
k = int(input())
ans = 1
for i in range(n):
  ans = min(ans*2,ans+k)

Failing test case input:
4
-6

Expected output:
-44


Actual output:

Fixed submission (verdict: Accepted):
n = int(input())
k = int(input())
ans = 1
for i in range(n):
  ans = min(ans*2,ans+k)
print(ans)

Problem: p03564
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

n=int(input())
k=int(input())
ans=1
for i in range(k):
    ans+=min(ans*2,ans+k)
print(ans)

Failing test case input:
10
21

Expected output:
137


Actual output:
12582891


Fixed submission (verdict: Accepted):

n=int(input())
k=int(input())
ans=1
for i in range(n):
    ans=min(ans*2,ans+k)
print(ans)
Problem: p03564
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
k = int(input())
 
num = 1
count = 0
 
while num <= k:
    num *= 2
    count += 1
    
while count < n:
  num += k
  count += 1
  
print(num)

Failing test case input:
10
-3

Expected output:
-1280


Actual output:
-29


Fixed submission (verdict: Accepted):
n = int(input())
k = int(input())
 
num = 1
count = 0
 
while count < n:
    num = min(num * 2, num + k)
    count += 1
  
print(num)

Problem: p03564
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
k=int(input())
s=1
for i in range(n):
  if s*2<=k:
    s=s*2
  else:
    s+=k
print(s)

Failing test case input:
10
-5

Expected output:
-2304


Actual output:
-2048


Fixed submission (verdict: Accepted):
n=int(input())
k=int(input())
s=1
for i in range(n):
  if (s*2)-s<=k:
    s=s*2
  else:
    s+=k
print(s)

Problem: p03564
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
K = int(input())
ans = 1
for i in range(N):
    ans = min(ans+K,2*ans)
print(min)

Failing test case input:
10
8

Expected output:
64


Actual output:
<built-in function min>


Fixed submission (verdict: Accepted):
N = int(input())
K = int(input())
ans = 1
for i in range(N):
    ans = min(ans+K,2*ans)
print(ans)

Problem: p03564
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
K = int(input())
i = 1
for num in range(N):
  if i < K:
    i *= 2
  else:
    i += K
print (K)

Failing test case input:
10
16

Expected output:
112


Actual output:
16


Fixed submission (verdict: Accepted):
N = int(input())
K = int(input())
i = 1
for num in range(N):
  if i < K:
    i *= 2
  else:
    i += K
print (i)

Problem: p03564
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
k=int(input())
ans = 1
for i in range(n):
  ans=max(2*ans,ans+k)
print(ans)

Failing test case input:
10
-40

Expected output:
-20224


Actual output:
1024


Fixed submission (verdict: Accepted):
n=int(input())
k=int(input())
ans = 1
for i in range(n):
  ans=min(2*ans,ans+k)
print(ans)

Problem: p03564
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
K=int(input())

ans=2**N
tmp=1
for i in range(2**N - 1):
  for j in range(N):
    if i>>j %2==1:
      tmp*=2
    else:
      tmp+=K
      
  ans=min(ans,tmp)
print(ans)

Failing test case input:
10
-5

Expected output:
-2304


Actual output:
-1825532


Fixed submission (verdict: Accepted):
N=int(input())
K=int(input())

ans=2**N

for i in range(2**N):
  tmp=1
  for j in range(N):
    if (i>>j) %2==1:
      tmp*=2
    else:
      tmp+=K     
  ans=min(ans,tmp)
print(ans)

Problem: p03564
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
k = int(input())
number = 1
for i in range(n):
    number = min(number+1, number*2)
print(number)

Failing test case input:
4
-23

Expected output:
-180


Actual output:
5


Fixed submission (verdict: Accepted):
n = int(input())
k = int(input())
number = 1
for i in range(n):
    number = min(number+k, number*2)
print(number)
Problem: p03564
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def addition_and_multiplication(N: int, K: int)->int:
    min_d = float('inf')
    for i in range(1 << N):
        d = 1
        
        
        for _ in range(N):
            if i & 1:
                d = d * 2
            else:
                d = d + K
        min_d = min(d, min_d)
    return min_d


if __name__ == "__main__":
    N = int(input())
    K = int(input())
    ans = addition_and_multiplication(N, K)
    print(ans)


Failing test case input:
10
28

Expected output:
172


Actual output:
281


Fixed submission (verdict: Accepted):
def addition_and_multiplication(N: int, K: int)->int:
    min_d = float('inf')
    for i in range(1 << N):
        d = 1
        
        
        for _ in range(N):
            if i & 1:
                d = d * 2
            else:
                d = d + K
            i >>= 1
        min_d = min(d, min_d)
    return min_d


if __name__ == "__main__":
    N = int(input())
    K = int(input())
    ans = addition_and_multiplication(N, K)
    print(ans)

Problem: p03564
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, k, w = int(input()), int(input()), 1
while w < k:
    w *= 2
    n -= 1
print(w + k*n)

Failing test case input:
10
-62

Expected output:
-31488


Actual output:
-619


Fixed submission (verdict: Accepted):
n, k, w = int(input()), int(input()), 1
for _ in range(n):
    w += min(w, k)
print(w)

Problem: p03564
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
import math
input=sys.stdin.readline

n = int(input())
k = int(input())

x = 1
while x < k:
    x *= 2
    n -= 1
for i in range(n):
    x += k
print(x)

Failing test case input:
4
-6

Expected output:
-44


Actual output:
-23


Fixed submission (verdict: Accepted):
import sys
import math
input=sys.stdin.readline

n = int(input())
k = int(input())

x = 1
for i in range(n):
    x = min(x*2, x+k)

print(x)

Problem: p03564
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
k = int(input())
for i in range(n):
    if n*2 < n+k:
        n = n*2
    else:
        n += k
print(n)

Failing test case input:
10
-12

Expected output:
-5888


Actual output:
-3584


Fixed submission (verdict: Accepted):
n = int(input())
k = int(input())
x = 1
for i in range(n):
    if x*2 < x+k:
        x = x*2
    else:
        x += k
print(x)

Problem: p03564
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n=int(input())
k=int(input())

now=1
for i in range(n):
  if now*2 >=k:
  	now+=k
  else:
    now*=2
print(now)


Failing test case input:
10
-13

Expected output:
-6400


Actual output:
-6144


Fixed submission (verdict: Accepted):
n=int(input())
k=int(input())

now=1
for i in range(n):
  if now*2 >=now+k:
  	now+=k
  else:
    now*=2
print(now)
Problem: p03564
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
k = int(input())
 
num = 1
count = 0
 
while num < k:
    num *= 2
    count += 1
    
num += (k * (n-count))
 
print(num)

Failing test case input:
4
-3

Expected output:
-20


Actual output:
-11


Fixed submission (verdict: Accepted):
n = int(input())
k = int(input())
 
num = 1
count = 0
 
while count < n:
    num = min(num * 2, num + k)
    count += 1
  
print(num)

Problem: p03564
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
k=int(input())

a=1

for i  in range(n):
  if a >=k:
    a=+k
  else:
    a=2*a

print(a)

Failing test case input:
4
-10

Expected output:
-76


Actual output:
-10


Fixed submission (verdict: Accepted):
n=int(input())
k=int(input())

a=1

for i  in range(n):
  if a >=k:
    a+=k
  else:
    a=2*a

print(a)

Problem: p03564
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,K=int(input()),int(input())
res=1
for _ in range(K):
  res=min(res*2,res+K)
print(res)

Failing test case input:
10
31

Expected output:
187


Actual output:
838


Fixed submission (verdict: Accepted):
N,K=int(input()),int(input())
res=1
for _ in range(N):
  res=min(res*2,res+K)
print(res)

Problem: p03564
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
k=int(input())
a=1
for i in range(n):
    if a*2>a+k:
        a=a*2
    else:
        a=a+k
print(a)
  




Failing test case input:
10
13

Expected output:
94


Actual output:
7168


Fixed submission (verdict: Accepted):
n=int(input())
k=int(input())
a=1
for i in range(n):
    if a*2>a+k:
       a=a+k
    else:
        a=a*2
print(a)

Problem: p03564
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
K=int(input())
res=1
cnt=0
while(res<K):
    res*=2
    cnt+=1
while(cnt<N):
    res+=K
    cnt+=1
print(res)
print(cnt)

Failing test case input:
10
1

Expected output:
11


Actual output:
11
10


Fixed submission (verdict: Accepted):
N=int(input())
K=int(input())
res=1
for i in range(N):
    if(res*2<res+K):
        res*=2
    else:
        res+=K
print(res)

Problem: p03564
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
k=int(input())
ans=1
for i in range(n):
  ans=max(ans+k,ans*2)
print(ans)
  

Failing test case input:
4
6

Expected output:
14


Actual output:
56


Fixed submission (verdict: Accepted):
n=int(input())
k=int(input())
ans=1
for i in range(n):
  ans=min(ans+k,ans*2)
print(ans)

Problem: p03564
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
k = int(input())

ans = 1
while ans < k:
    ans *= 2
    n -= 1

ans += n * k
print(ans)


Failing test case input:
10
-62

Expected output:
-31488


Actual output:
-619


Fixed submission (verdict: Accepted):
n = int(input())
k = int(input())

ans = 1
for i in range(n):
    if ans * 2 < ans + k:
        ans *= 2
    else:
        ans += k

print(ans)
Problem: p03564
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a=int(input())
b=int(input())
c=1
for i in range(a):
  if 2*c>=c+b:
    c=2*c
  else:
    c=c+b
print(c)

Failing test case input:
10
27

Expected output:
167


Actual output:
14336


Fixed submission (verdict: Accepted):
a=int(input())
b=int(input())
c=1
for i in range(a):
  if 2*c<=c+b:
    c=2*c
  else:
    c=c+b
print(c)

Problem: p03564
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
K = int(input())
x = 1
  
a = 0
while 2**a <= K:
  a += 1

for i in range(a):
  x = x*2
for i in range(N-a):
  x = x + K

print(x)

Failing test case input:
10
-32

Expected output:
-16128


Actual output:
-319


Fixed submission (verdict: Accepted):
N = int(input())
K = int(input())
x = 1
  
for i in range(N):
  if x < K:
    x = x*2
  else:
    x = x + K

print(x)

Problem: p03564
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
k = int(input())
ans = 1
for _ in range(n):
    if ans < n:
        ans *= 2
    else:
        ans += k
print(ans)

Failing test case input:
4
-3

Expected output:
-20


Actual output:
2


Fixed submission (verdict: Accepted):
n = int(input())
k = int(input())
ans = 1
for _ in range(n):
    ans = min(ans*2, ans+k)
print(ans)

Problem: p03564
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
K = int(input())

i = 0
ans = 1
while True:
    print(ans)
    if i == N:
        break
    if ans < K:
        ans *= 2
        i += 1
    else:
        ans += K
        i += 1

print(ans)

Failing test case input:
10
-23

Expected output:
-11520


Actual output:
1
-22
-45
-90
-180
-360
-720
-1440
-2880
-5760
-11520
-11520


Fixed submission (verdict: Accepted):
N = int(input())
K = int(input())

i = 0
ans = 1
while True:
    if i == N:
        break
    if ans < K:
        ans *= 2
        i += 1
    else:
        ans += K
        i += 1

print(ans)

Problem: p03564
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
K = int(input())

ans = 1
count = 0
while ans < K:
    ans = 2 * ans
    count += 1
ans = ans + K*(N-count)

print(ans)

Failing test case input:
10
-62

Expected output:
-31488


Actual output:
-619


Fixed submission (verdict: Accepted):
N = int(input())
K = int(input())

ans = 1

for i in range(N):
    if ans < K:
        ans = 2*ans
    else:
        ans = ans + K

print(ans)

Problem: p03564
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
k = int(input())

d = 1

for i in range(n):
	print(d)
	if d < k:
		d = d*2
	else:
		d += k

print(d)

Failing test case input:
10
-18

Expected output:
-8960


Actual output:
1
-17
-35
-70
-140
-280
-560
-1120
-2240
-4480
-8960


Fixed submission (verdict: Accepted):
n = int(input())
k = int(input())

d = 1

for i in range(n):
	if d + k <= d * 2:
		d += k
	else:
		d *= 2

print(d)
Problem: p03564
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
k = int(input())
for i in range(10):
  n = min(2*n,n+k)
print(n)

Failing test case input:
10
22

Expected output:
142


Actual output:
216


Fixed submission (verdict: Accepted):

n = int(input())
k = int(input())
t = 1
for i in range(n):
	t = min(2*t,t+k)
print(t)

Problem: p03564
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N = int(input())
K = int(input())

ans = 1

for i in range(N):
  if i>K:
    ans += K
  else:
    ans *= 2
print(ans)

Failing test case input:
10
-19

Expected output:
-9472


Actual output:
-189


Fixed submission (verdict: Accepted):
N = int(input())
K = int(input())

ans = 1

for i in range(N):
  if ans>K:
    ans += K
  else:
    ans *= 2
print(ans)

Problem: p03564
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
K = int(input())

D = int(1)

for i in range(N):
    if D < N:
        D *= 2
    else:
        D += K

print(int(D))

Failing test case input:
10
22

Expected output:
142


Actual output:
148


Fixed submission (verdict: Accepted):
N = int(input())
K = int(input())

D = int(1)

for i in range(N):
    if D * 2 < D + K:
        D *= 2
    else:
        D += K

print(D)

Problem: p03564
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def bin(a):
  return 2*a

def ten(a):
  return a+10

N = int(input())
K = int(input())
value = 1
for i in range(N):
  if bin(value) <= ten(value) :
    value = bin(value)
  else:
    value = ten(value)
print(value)

Failing test case input:
10
45

Expected output:
244


Actual output:
76


Fixed submission (verdict: Accepted):
def bin(a):
  return 2*a

def ten(a):
  return a+K

N = int(input())
K = int(input())
value = 1
for i in range(N):
  if bin(value) <= ten(value) :
    value = bin(value)
  else:
    value = ten(value)
print(value)

Problem: p03564
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
K = int(input())
ans = 0
for _ in range(N):
  if ans + K > ans * 2:
    ans *= 2
  else:
    ans += K
print(ans)
    

Failing test case input:
10
-17

Expected output:
-8448


Actual output:
-8704


Fixed submission (verdict: Accepted):
N = int(input())
K = int(input())
ans = 1
for _ in range(N):
  if ans + K > ans * 2:
    ans *= 2
  else:
    ans += K
print(ans)

Problem: p03564
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
K=int(input())
ans=[]
for i in range(N):
    ans.append((i+1)*2+(N-i-1))
print(min(ans))

Failing test case input:
10
-33

Expected output:
-16640


Actual output:
11


Fixed submission (verdict: Accepted):
N=int(input())
K=int(input())
ans=1
for i in range(N):
    ans=min(ans*2,ans+K)
print(ans)

Problem: p03564
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
k = int(input())
 
num = 1
count = 0
 
while num <= k:
    num *= 2
    count += 1
    
num += (k * (n-count))
 
print(num)

Failing test case input:
4
-23

Expected output:
-180


Actual output:
-91


Fixed submission (verdict: Accepted):
n = int(input())
k = int(input())
 
num = 1
count = 0
 
while count < n:
    num = min(num * 2, num + k)
    count += 1
  
print(num)