Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p02720 (python)

Fixed submission:
n = int(input())
a = list(map(str, (range(1, 10))))
total = a[:]
cnt = 9
while cnt < n:
    new = []
    for i in a:
        if i[-1] == "0":
            new.append(i + "0")
            new.append(i + "1")
            cnt += 2
            if cnt >= n:
                break
        elif i[-1] == "9":
            new.append(i + "8")
            new.append(i + "9")
            cnt += 2
            if cnt >= n:
                break
        else:
            new.append(i + str(int(i[-1]) -1))
            new.append(i + str(int(i[-1])))
            new.append(i + str(int(i[-1]) + 1))
            cnt += 3
            if cnt >= n:
                break
    total += new[:]
    a = new[:]
                
print(total[n-1])

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(str, (range(1, 10))))
total = a[:]
cnt = 9
while cnt < n:
    new = []
    for i in a:
        if i[-1] == "0":
            new = [(i + "0"), (i + "1")]
            cnt += 2
            if cnt >= n:
                break
        elif i[-1] == "9":
            new = [(i + "8"), (i + "9")]
            cnt += 2
            if cnt >= n:
                break
        else:
            new.append(i + str(int(i[-1]) -1))
            new.append(i + str(int(i[-1])))
            new.append(i + str(int(i[-1]) + 1))
            cnt += 3
            if cnt >= n:
                break
    total += new[:]
    a = new[:]
                
print(total[n-1])
Problem p02732 (python)

Fixed submission:
import collections
import math

n = int(input())

m = list(map(str,input().split()))

c = dict(collections.Counter(m))
d = {}
hyouji = {}
def ans(a):
    if a<2:
        return 0
    else:
        return math.factorial(a) // (math.factorial(a - 2) * math.factorial(2))

cnt = 0
for i,j in c.items():
    n = ans(j)
    d[i] = n
    cnt += n


for k in m:
    if k in hyouji:
        print(hyouji[k])
    else: 
        if c[k] < 2:
            q = cnt
        elif c[k] == 2:
            q = cnt - 1
        else:
                q = cnt -d[k] + ans(c[k] - 1)

        hyouji[k] = q
        print(hyouji[k])

Buggy submission (verdict: Runtime Error):
import collections
import math

n = int(input())

m = list(map(str,input().split()))

c = dict(collections.Counter(m))
d = {}
sets = {}
def ans(a):
    if a<2:
        return 0
    else:
        return math.factorial(a) // (math.factorial(a - 2) * math.factorial(2))

for i in m:
    if i in sets:
        print(sets[i])
    else:
        cnt = 0
        for j,k in c.items():
            if j == i:
                if k - 1 >= 2:
                    d.clearsetdefault(j, ans(k-1))
                    cnt += d[j]
                
                else:
                    d.setdefault(j, ans(k))
                    cnt += d[j]
                    sets[i] = cnt
        print(cnt)
Problem p02761 (python)

Fixed submission:
flag = 1
keta,n = map(int,input().split())
sc = []
for i in range(n):
    sc.append(list(map(int,input().split())))

ans = [None]*keta

for j in sc:
    if j[0] == 1 and j[1] == 0 and keta != 1:
        flag = 0

    else:
        try:
            if ans[j[0]-1] == None:
                ans[j[0]-1] = j[1]
            elif ans[j[0]-1] != None and ans[j[0]-1] != j[1]:
                flag = 0
        except:
            flag = 0
        
        
for k in range(len(ans)):
    if k == 0 and ans[0] == None and keta != 1:
        ans[0] = 1
    elif ans[k] == None:
        ans[k] = 0
            
ans_s = ""
for l in ans:
    ans_s += str(l)
    
if flag == 0:
    print("-1")        
else:
    print(ans_s)

Buggy submission (verdict: Runtime Error):
flag = 1
keta,n = map(int,input().split())
sc = []
for i in range(n):
    sc.append(list(map(int,input().split())))

ans = [None]*keta

for j in sc:
    if j[0] == 1 and j[1] == 0 and keta != 1:
        flag = 0
    elif keta == 1:
        ans[0] = j[0][1]
    else:
        try:
            if ans[j[0]-1] == None:
                ans[j[0]-1] = j[1]
            elif ans[j[0]-1] != None and ans[j[0]-1] != j[1]:
                flag = 0
        except:
            flag = 0
        
        
for k in range(len(ans)):
    if k == 0 and ans[0] == None:
        ans[0] = 1
    elif ans[k] == None:
        ans[k] = 0
            
ans_s = ""
for l in ans:
    ans_s += str(l)
    
if flag == 0:
    print("-1")        
else:
    print(ans_s)

Buggy submission (verdict: Runtime Error):
flag = 1
keta,n = map(int,input().split())
sc = []
for i in range(n):
    sc.append(list(map(int,input().split())))

ans = [None]*n

for j in sc:
    if j[0] == 1 and j[1] == 0:
        flag = 0
    elif ans[j[0]-1] == None:
        ans[j[0]-1] = j[1]
    elif ans[j[0]-1] != j[1]:
        flag = 0
        
        
for k in range(len(ans)):
    if k == 0 and ans[0] == None:
        ans[0] = 1
    elif ans[k] == None:
        ans[k] = 0
            
ans_s = ""
for l in ans:
    ans_s += str(l)
    
if flag == 0:
    print("-1")        
else:
    print(ans_s)

Buggy submission (verdict: Runtime Error):
flag = 1
keta,n = map(int,input().split())
sc = []
for i in range(n):
    sc.append(list(map(int,input().split())))

ans = [None]*n

for j in sc:
    if j[0] == 1 and j[1] == 0:
        flag = 0
    if ans[j[0]-1] == None:
        ans[j[0]-1] = j[1]
    elif ans[j[0]-1] == j[1]:
        pass
    else:
        flag = 0


else:
    for k in range(len(ans)):
        if k == 0 and ans[0] == 0:
            ans[0] = 1
        elif ans[k] == None:
            ans[k] = 0
ans_s = ""
for l in ans:
    ans_s += str(l)
    
if flag == 0:
    print("-1")        
else:
    print(ans_s)
Problem p02789 (python)

Fixed submission:
n ,m = map(int,input().split())
 
if n == m:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n ,m = int(input())

if n == m:
  print("Yes")
else:
  print("No")
Problem p02882 (python)

Fixed submission:
import math

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

if x == (a*a*b):
    print("0")
elif x > (a*a*b)/2:
    h = (2*x)/(a*a)-b
    kaku = 90 - math.degrees(math.atan(a/(b-h)))
    print(kaku)
else:
    h = (2*x)/(a*b)
    kaku = 90 - math.degrees(math.atan(h/b))
    print(kaku)

Buggy submission (verdict: Runtime Error):
import math

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

if x > (a*a*b)/2:
    h = (2*x)/(a*a)-b
    kaku = 90 - math.degrees(math.atan(a/(b-h)))
    print(kaku)
else:
    h = (2*x)/(a*b)
    kaku = 90 - math.degrees(math.atan(h/b))
    print(kaku)

Buggy submission (verdict: Runtime Error):
import math

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

if x > (a*a*b)/2:
    h = (2*x)/(a*a)-b
    kaku = 90 - math.degrees(math.atan(a/(b-h)))
    print(kaku)
else:
    h = (2*x)/(a*b)
    kaku = 90 - math.degrees(math.atan(h/b))
    print(kaku)
Problem p02885 (python)

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

if a >= 2*b:
    print(a-2*b)
else:
    print("0")

Buggy submission (verdict: Runtime Error):
a,b = map(int,input())

if a >= 2*b:
    print(a-2*b)
else:
    print("0")

Buggy submission (verdict: Runtime Error):
a,b = map(int,input())

if a >= 2b:
    print(a-2*b)
else:
    print("0")
Problem p02886 (python)

Fixed submission:
n = int(input())
d = list(map(int,input().split()))
ans = 0
for i in range(n - 1):
    for j in range(i + 1,n):
        ans += d[i] * d[j]
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
d = list(map(int,input().split()))
ans = 0
for i in range(n - 1):
    for j in (i + 1,n):
        ans += d[i] * d[j]
print(ans)
Problem p02923 (python)

Fixed submission:
full_num = int(input())     
A = list(map(int, input().split()))  
move = 0
A_result = ""
for i in range(full_num-1):
   if  A[i] >= A[i+1]:
       A_result =A_result+"1"
   else:
       A_result =A_result+"0"
B = list(A_result.split("0"))
C = []
for i in B:
    C.append(len(i))
print(max(C))

Buggy submission (verdict: Runtime Error):
n = int(input())
h = list(map(int, input().split()))

cnt =0
m =[]
for i in range(n - 1):
	if h[i] >= h[i + 1]:
		cnt += 1
		if i == n - 2:
			m.append(cnt)
	else:
		m.append(cnt)
		cnt = 0

print(max(m))
Problem p02999 (python)

Fixed submission:
a,b = map(int,input().split())
 
if a >= b:
  print("10")
else:
  print("0")

Buggy submission (verdict: Runtime Error):
a,b = int(input())

if a >= b:
  print("10")
else:
  print("0")
Problem p03000 (python)

Fixed submission:

n,x = map(int,input().split())
b = list(map(int,input().split()))
cnt = 0
ans = 1
for i in b:
    cnt += i
    if cnt <= x:
        ans += 1

print(ans)

Buggy submission (verdict: Runtime Error):
n,x = map(int,input().split())
b = list(map(int,input().split()))
cnt  = 0
ans = 0
while cnt<=x:
  cnt += b[ans]
  ans += 1

print(ans)
Problem p03029 (python)

Fixed submission:
a,p = map(int,input().split())
print((a * 3 + p)//2)

Buggy submission (verdict: Runtime Error):
a,p = map(int,input())
print((a * 3 + p)//2)
Problem p03105 (python)

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

if b >= a * c:
    print(c)
else:
    print(int(b//a))

Buggy submission (verdict: Runtime Error):
a,b,c = map(int(),input().split())

if b >= a * c:
  print(c)
else:
  print(int(b//a))
Problem p03627 (python)

Fixed submission:
import collections
 
n = int(input())
lens = list(map(int,input().split()))
lens = collections.Counter(lens)
lens = sorted(lens.items(), key=lambda x:x[0], reverse = True)
cnt = 0
for j in lens:
  if j[1] >= 4 and cnt == 0:
    print(j[0]**2)
    break
  elif j[1] >= 2 and cnt == 0:
    cnt = j[0]
  elif j[1] >= 2 and cnt != 0:
    print(cnt * j[0])
    break
else:
    print(0)

Buggy submission (verdict: Runtime Error):
n = int(input())
lens = list(map(int,input().split()))
items = set[lens]
items = list(items).sort(reverse = True)
cnt = 0
for j in items:
  if j >= 4 and cnt == 0:
    print(j**2)
    break
  elif j >= 2 and cnt == 0:
    cnt = j
  elif j >= 2 and cnt != 0:
    print(cnt * j)
    break
else:
  print(0)

Buggy submission (verdict: Runtime Error):
n = int(input())
lens = list(map(int,input().split()))

lens.sort(reverse = True)
cnt = 0
for i in lens:
  if l.count(i) >= 4 and cnt != 0:
    print(i*2)
    break
  elif l.count(i) >= 2 and cnt == 0:
    cnt = i
  elif l.count(i) >= 2 and cnt != 0:
    print(cnt * i)
    break
else:
  print(0)
Problem p03838 (python)

Fixed submission:
x,y = map(int,input().split())
 
if abs(y) > abs(x):
  if x >= 0 and y >= 0:
    print(y-x)
  elif x < 0 and y <0:
    print(abs(y)-abs(x)+2)
  else:
    print(abs(y)-abs(x)+1)
elif abs(y) < abs(x):
  if x > 0 and y > 0:
    print(x - y + 2)
  elif x <= 0 and y <=0:
    print(abs(abs(y)-abs(x)))
  else:
    print(abs(abs(y)-abs(x))+1)
else:
  if x == y:
    print("0")
  else:
    print("1")

Buggy submission (verdict: Runtime Error):
x,y = map(int,input().split())
 
if abs(y) > abs(x):
  if x > 0 and y > 0:
    print(y-x)
  elif x < 0 and y <0:
    print(abs(y)-abs(x)+2)
  else:
    print(abs(y)-abs(x)+1)
elif abs(y) < abs(x):
  if x > 0 and y > 0:
    print(x - y + 2)
  elif x < 0 and y <0:
    print(abs(y-x)+ 2)
  else:
    print(abs(abs(y)-abs(x))+1)
else:
  if x == y:
    print("0")
  else:
    print("1")
x,y = map(int,input().split())
 
if abs(y) > abs(x):
  if x > 0 and y > 0:
    print(y-x)
  elif x < 0 and y <0:
    print(abs(y)-abs(x)+2)
  else:
    print(abs(y)-abs(x)+1)
elif abs(y) < abs(x):
  if x > 0 and y > 0:
    print(x - y + 2)
  elif x < 0 and y <0:
    print(abs(y-x))
  else:
    print(abs(abs(y)-abs(x))+1)
else:
  if x == y:
    print("0")
  else:
    print("1")

Buggy submission (verdict: Runtime Error):
x,y = map(int,input().split())
 
if abs(y) > abs(x):
  if x > 0 and y > 0:
    print(y-x)
  elif x < 0 and y <0:
    print(abs(y)-abs(x)+2)
  else:
    print(abs(y)-abs(x)+1)
elif abs(y) < abs(x):
  if x > 0 and y > 0:
    print(ads(y-x+2))
  elif x < 0 and y <0:
    print(abs(y-x))
  else:
    print(abs(abs(y)-abs(x))+1)
else:
  if x == y:
    print("0")
  else:
    print("1")

Buggy submission (verdict: Runtime Error):
x,y = map(int,input().split())

if abs(y) > abs(x):
  if x > 0 and y > 0:
    print(y-x)
  elif x < 0 and y <0:
    print(y-x+2)
  else:
    print(y-x+1)
elif abs(y) < abs(x):
  if x > 0 and y > 0:
    print(ads(y-x+2))
  elif x < 0 and y <0:
    print(abs(y-x))
  else:
    print(abs(y-x+1))
else:
  if x == y:
    print("0")
  else:
    print("1")
Problem p02702 (python)

Fixed submission:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    s=STR()
    cnt=[0]*2019
    cnt[0]=1
    temp=0
    keta=1
    ans=0
    for i in s[::-1]:
        temp=(temp+int(i)*keta)%2019
        keta=(keta*10)%2019
        cnt[temp]+=1
    for i in cnt:
        ans+=(i*(i-1))//2
    print(ans)
    
    
if __name__ == '__main__':
    do()

Buggy submission (verdict: Runtime Error):
import numpy as np
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    s=STR()
    count=np.zeros(2019,dtype=int)
    ans=0
    count_t=np.zeros(2019,dtype=int)
    for i in range(len(s)):
        count_t[int(s[i])]+=1
        for k in range(2019):
            if count[k]==0:
                continue
            else: 
                t=(k*10+int(s[i]))%2019
                count_t[k]-=count[k]
                count_t[t]+=count[k]
                if t==0:
                    ans+=count[k]
        #print(count[0:20])
        #print(count_t[0:20])
        count=count+count_t
        count_t-=count_t
    print(ans)
                
if __name__ == '__main__':
    do()

Buggy submission (verdict: Runtime Error):
import numpy as np
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    s=STR()
    count=np.zeros(2019,dtype=int)
    ans=0
    count_t=np.zeros(2019,dtype=int)
    for i in range(len(s)):
        count_t[int(s[i])]+=1
        for k in range(2019):
            t=(k*10+int(s[i]))%2019
            count_t[k]-=count[k]
            count_t[t]+=count[k]
            if t==0:
                ans+=count[k]
        #print(count[0:20])
        #print(count_t[0:20])
        count=count+count_t
        count_t-=count_t
    print(ans)
                
if __name__ == '__main__':
    do()
Problem p02756 (python)

Fixed submission:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    s=STR()
    q=INT()
    l=''
    r=''
    ct=0
    for i in range(q):
        fc=LISTS()
        if fc[0]=="1":
            ct+=1
        else:
            if fc[1]=="1":
                if ct%2==0:
                    l=fc[2]+l
                else:
                    r=r+fc[2]
            else:
                if ct%2==1:
                    l=fc[2]+l
                else:
                    r=r+fc[2]
    
    sums=l+s+r
    if ct%2==1:
        ans=""
        for i in range(len(sums)-1,-1,-1):
            ans=ans+sums[i]
    else:
        ans=sums
    
    print(ans)
                
if __name__ == '__main__':
    do()

Buggy submission (verdict: Runtime Error):

INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))

def query2(s,f,c,ct):
    if ct%2==1:
        s.reverse()
    
    if f=='1':
        s=c+s
    else:
        s=s+c
    
    
    #print(s)
    return s
    
def do():
    S=STR()
    q=INT()
    ct=0
    for i in range(q):
        qt=LISTS()
        if qt[0]=='1':
            ct+=1
        else:
            S=query2(S,qt[1],qt[2],ct)
            ct=0
    
    if ct%2==1:
        S.reverse()
    
    print(S)
    
if __name__ == '__main__':
    do()
Problem p02813 (python)

Fixed submission:
from itertools import permutations as pe
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))

def do():
    n=INT()
    ns=[]
    for i in range(1,n+1):
        ns.append(str(i))
    p=LISTS()
    q=LISTS()
    ct=0
    for v in pe(ns,n):
        v=list(v)
        #print(v,p,q)
        ct+=1
        if p==v:
            a=ct
        if q==v:
            b=ct

    print(abs(a-b))
if __name__=='__main__':
    do()

Buggy submission (verdict: Runtime Error):
from itertools import permutations as pe
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))

def do():
    n=INT()
    ns=[]
    for i in range(1,n+1):
        ns.append(str(i))
    p=LISTS()
    q=LISTS()
    ct=0
    for v in pe(ns,n):
        v=list(v)
        #print(v,p,q)
        ct+=1
        if p==v:
            a=ct
        elif q==v:
            b=ct

    print(abs(a-b))
if __name__=='__main__':
    do()
Problem p02957 (python)

Fixed submission:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a,b=INTM()
    if (a+b)%2==1:
        print('IMPOSSIBLE')
    else:
        print((a+b)//2)
if __name__ == '__main__':
    do()

Buggy submission (verdict: Runtime Error):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a,b=INTM()
    if (a+b)%2==1:
        print('IMPOSSIBLE')
    else:
        print((a+B)//2)
if __name__ == '__main__':
    do()

Buggy submission (verdict: Runtime Error):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a,b=INTM()
    if (a+b)%2==!:
        print('IMPOSSIBLE')
    else:
        print((a+B)//2)
if __name__ == '__main__':
    do()
Problem p03106 (python)

Fixed submission:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a,b,n=INTM()
    ct=0
    c=min(a,b)
    for i in range(c,0,-1):
        if a%i==0 and b%i==0:
            ct+=1
            if ct==n:
                ans=i
    print(ans)
if __name__ == '__main__':
    do()

Buggy submission (verdict: Runtime Error):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a,b,n=INTM()
    ct=0
    c=min(a,b)
    for i in range(c,1,-1):
        if a%i==0 and b%i==0:
            ct+=1
            if ct==n:
                ans=i
    print(ans)
if __name__ == '__main__':
    do()

Buggy submission (verdict: Runtime Error):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a,b,n=INTM()
    ct=0
    c=min(a,b)
    for i in range(c,1,-1):
        if a%i==0 and b%i==0:
            ct+=1
            if ct==n:
                ans=i
    print(ans)
if __name__ == '__main__':
    do()
Problem p03606 (python)

Fixed submission:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    n=INT()
    ans=0
    for i in range(n):
        l,r=INTM()
        ans+=r-l+1
    print(ans)
if __name__ == '__main__':
    do()

Buggy submission (verdict: Runtime Error):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    n=INT()
    ans=0
    for i n range(n):
        l,r=INTM()
        ans+=r-l+1
    print(ans)
if __name__ == '__main__':
    do()
Problem p03711 (python)

Fixed submission:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a=[1,3,5,7,8,10,12]
    b=[4,6,9,11]
    c=[2]
    x,y = INTM()
    if x in a:
        d = 21
    elif x in b:
        d = 22
    elif x==2:
        d = 23
    
    if y in a:
        f = 21
    elif y in b:
        f = 22
    elif y==2:
        f = 23
    
    if d==f:
        print('Yes')
    else:
        print('No')
if __name__ == '__main__':
    do()

Buggy submission (verdict: Runtime Error):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a=[1,3,5,7,8,10,12]
    b=[4,6,9,11]
    c=[2]
    x,y = INTM()
    if x in a:
        d = 21
    elif x in b:
        d = 22
    elif x==2:
        d = 23
    
    if y in a:
        f = 21
    elif x in b:
        f = 22
    elif y==2:
        f = 23
    
    if d==f:
        print('Yes')
    else:
        print('No')
if __name__ == '__main__':
    do()
Problem p02576 (python)

Fixed submission:
import math
def MAP(): return map(int, input().split())
N, X, T = MAP()

print(math.ceil(N / X) * T)

Buggy submission (verdict: Runtime Error):
print("No"if int(input())%9else"Yes")