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

Fixed submission:
num=int(input())
if num>81:
    print('No')
else:
    num_list=[]
    
    for a in range(1,10):
        for b in range(1,10):
            num_list.append(a*b)
    num_list=set(num_list)
    if num in num_list:
        print('Yes')
    else:
        print('No')

Buggy submission (verdict: Runtime Error):
num=int(input())
if num>81:
    return('No')
else:
    num_list=[]
    
    for a in range(1,10):
        for b in range(1,10):
            num_list.appned(a*b)
    num_list=set(num_list)
    if num in num_list:
        print('Yes')
    else:
        print('No')
Problem p02916 (python)

Fixed submission:
import numpy as np
N = int(input())
A, B, C = [list(map(int, input().split())) for _ in range(3)]
score=0
pred_i=np.inf
for i in A:
    if pred_i+1 ==i:
        score=score+C[i-2]+B[i-1]
    else:
        score+=B[i-1]
    pred_i=i
print(score)

Buggy submission (verdict: Runtime Error):
N = int(input())
A, B, C = [list(map(int, input().split())) for _ in range(3)]
score=0
pred_i=np.inf
for i in A:
    if pred_i+1 ==i:
        score=score+C[i-2]+B[i-1]
    else:
        score+=B[i-1]
    pred_i=i
print(score)

Buggy submission (verdict: Runtime Error):

N = int(input())
A = list(map(int, input().split())) 
B = list(map(int, input().split())) 
C = list(map(int, input().split())) 
score=0
pred_i=np.inf
for i in A:
    if pred_i+1 ==i:
        score=score+C[i-2]+B[i-1]
    else:
        score+=B[i-1]
    pred_i=i
print(score)
Problem p03011 (python)

Fixed submission:
p, q, r = map(int, input().split())
# 文字列の入力
# s = input()
# 出力
 
 
print("{}".format(min(p+q, q+r, r+p)))

Buggy submission (verdict: Runtime Error):
p, q, r = map(int, input().split())
# 文字列の入力
# s = input()
# 出力


print("{} {}".format(min(p+q, q+r, r+p), s))
Problem p03013 (python)

Fixed submission:
MOD = 10**9 + 7
N, M = [int(s) for s in input().split()]
#行ってはいけないところには0がはいる
ls = [1 for _ in range(N + 1)]
for i in range(M):
    ls[int(input())] = 0

for n in range(2, N + 1):
    if ls[n] != 0:
        #(n*m)mod k ==(n(mod k)*m(mod k))
        ls[n] = (ls[n - 1] + ls[n - 2]) % MOD
print(ls[N])

Buggy submission (verdict: Runtime Error):
import numpy as np
from math import factorial as fac

N,M=  map(int, input().split())
broken_steps=[]

for m in range(M):
    broken_steps.append(int(input()))

for i in range(len(broken_steps)-1):
    if broken_steps[i+1]-broken_steps[i]==1:
        print("{}".format(0))
        FLG=True

if FLG!=True:        
    count=0
    for two_step in range(M,N//2+1):
        one_step=N-two_step*2
        count+=fac(two_step+one_step)/(fac(two_step)*fac(one_step))

    print("{}".format(count%1000000007))
Problem p02711 (python)

Fixed submission:
numbers = [i for i in input()]
print("Yes" if "7" in numbers else "No")

Buggy submission (verdict: Runtime Error):
is_lucky = any(i == "7" for i in input().split())
print("Yes" if is_luckey else "No")
Problem p02916 (python)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))

base = sum(B)
bonus = 0
for i, num in enumerate(A):
  if i + 1 >= len(A):
    break
  if A[i+1] == num + 1:
    bonus += C[num - 1]

print(base + bonus)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))

base = sum(B)
bonus = 0
for i, num in enumerate(A):
  if i+1 >= len(A):
    break
  if A[i+1] == A[i] + 1:
    bonus += C[i+1]

print(base + bonus)
Problem p02915 (python)

Fixed submission:
print(int(input())**3)

Buggy submission (verdict: Runtime Error):
print(int(input)**3)

Buggy submission (verdict: Runtime Error):
n = input()
print(n**3)
Problem p02753 (python)

Fixed submission:
S=str(input())
if S=='AAA' or S=='BBB':
    print('No')
else:
    print('Yes')

Buggy submission (verdict: Runtime Error):
S=str(input())
if S==AAA or S==BBB:
    print('No')
else:
    print('Yes')
Problem p02847 (python)

Fixed submission:
S=input()
if S=='SUN':
  print('7')
elif S=='MON':
  print('6')
elif S=='TUE':
  print('5')
elif S=='WED':
  print('4')
elif S=='THU':
  print('3')
elif S=='FRI':
  print('2')
else:
  print('1')

Buggy submission (verdict: Runtime Error):
S=input()
if S==SUN:
  print('7')
elif S==MON:
  print('6')
elif S==TUE:
  print('5')
elif S==WED:
  print('4')
elif S==THU:
  print('3')
elif S==FRI:
  print('2')
else:
  print('1')

Buggy submission (verdict: Runtime Error):
S=input()
if S==SUN:
  print('7日後')
elif S==MON:
  print('6日後')
elif S==TUE:
  print('5日後')
elif S==WED:
  print('4日後')
elif S==THU:
  print('3日後')
elif S==FRI:
    print('2日後')
else:
    print('1日後')

Buggy submission (verdict: Runtime Error):
S=input()
if S==SUN:
  print('7日後')
  elif S==MON:
    print('6日後')
  elif S==TUE:
    print('5日後')
  elif S==WED:
    print('4日後')
  elif S==THU:
    print('3日後')
  elif S==FRI:
    print('2日後')
  else S==SAT:
    print('1日後')

Buggy submission (verdict: Runtime Error):
S=input()
if S==SUN:
  print('7日後')
elif S==MON:
  print('6日後')
elif S==TUE:
  print('5日後')
elif S==WED:
  print('4日後')
elif S==THU:
  print('3日後')
elif S==FRI:
  print('2日後')
else S==SAT:
  print('1日後')
Problem p02860 (python)

Fixed submission:
N=int(input())
S=input()
ans=0
if N%2==0:
  for i in range(N//2):
    if S[i]==S[i+(N//2)]:
      ans+=1
if ans==N/2:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
N=int(input())
S=input()
ans=0
if N%2==0:
  for i in range(N/2):
    if S[i]==S[i+(N/2)]:
      ans+=1
if ans==N/2:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
N=int(input())
S=input()
ans=0
if N%2==0:
  for i in range(N/2):
    if S[i]==S[i+N/2]:
      ans+=1
if ans==N/2:
  print('Yes')
else:
  print('No')
Problem p02879 (python)

Fixed submission:
A,B = map(int,input().split())
if 1<=A<=9 and 1<=B<=9:
  print(A*B)
else:
  print('-1')

Buggy submission (verdict: Runtime Error):
A=int(input())
B=int(input())
if A<=9 and B<=9:
  print(A*B)
else:
  print(-1)

Buggy submission (verdict: Runtime Error):
A=int(input)
B=int(input)
if 1<=A<=9 and 1<=B<=9:
  print(A*B)
else:
  print(-1)

Buggy submission (verdict: Runtime Error):
A=input('A')
B=input('B')
if 1<=A<=9 and 1<=B<=9:
    print(int(A)*int(B))
else
print('-1')
Problem p02881 (python)

Fixed submission:
N=int(input())
ans=10**12
for  x in range(1,int((N)**0.5+1)):
    if N%x==0:
        if (x+int((N/x)-2))<ans:
            ans=(x+int((N/x))-2)
print(ans)

Buggy submission (verdict: Runtime Error):
N=int(input())
ans=10**12
for  x in range(1,(N+1)**0.5):
    if N%x==0:
        if (x+int((N/x)-2))<ans:
            ans=(x+int((N/x))-2)
print(ans)
Problem p02916 (python)

Fixed submission:
N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
ans=0
for x in range(len(B)):
  ans=ans+B[x]
for i in range(len(A)-1):
  if (A[i+1]-A[i])==1:
    ans=ans+C[A[i]-1]
print(ans)

Buggy submission (verdict: Runtime Error):
N=int(input)
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
ans=0
for x in range(len[B]):
  ans=ans+B[x]
for i in range(len[A]-1):
  if (A[i+1]-A[i])==0:
    ans=ans+C[A[i]-1]
print(ans)
Problem p02754 (python)

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

num_A=int(N/(A+B))
sur=int(N-(A+B)*num_A)

if A==0:
    print(0)
elif A!=0 and N>(A+B) and sur>=A:
    print(num_A*A+A)
elif A!=0 and N>(A+B) and sur<A:
    print(num_A*A+sur)
elif A!=0 and N<=(A+B) and N>=A:
    print(A)
elif A!=0 and N<=(A+B) and N<A:
    print(N)

Buggy submission (verdict: Runtime Error):
if A==0:
    print(0)
elif A!=0 and N>(A+B):
    print(num_A*A+int(sur/(A+B)))
elif A!=0 and N<=(A+B) and N>=A:
    print(A)
elif A!=0 and N<=(A+B) and N<A:
    print(N)
Problem p02759 (python)

Fixed submission:
N=int(input())

if N%2==0:
    print(int(N/2))
else :
    print(int(N/2)+1)

Buggy submission (verdict: Runtime Error):
N=input()

if N%2==0:
    print(int(N/2))
else :
    print(int(N/2)+1)
Problem p02831 (python)

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

for i in range(max(A,B)):
    if A%(i+1)==0 and B%(i+1)==0:
        gcd=i+1

ANS=A*B/gcd

print(int(ANS))

Buggy submission (verdict: Runtime Error):
import math

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

gcd=math.gcd(A,B)

ANS=A*B/gcd

print(int(ANS))
Problem p02860 (python)

Fixed submission:
N=int(input())
S=input()
flag=0

if N%2==0:
    for i in  range(0,int(N/2)):
        if S[i]!=S[i+int(N/2)]:
            flag+=1

    if flag==0:
        print('Yes')
    else :
        print('No')
else :
    print('No')

Buggy submission (verdict: Runtime Error):
N=int(input())
S=input()

flag=0

if N%2==0:
    for i in range(int(N/2)):
        if S[i]!=S[i+3]:
            flag+=1

    if flag==0:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
N=int(input())
S=input()
flag=0

if N%2==0:
    for i in  range(0,int(N/2)):
        if S[i]!=S[i+3]:
            flag+=1

    if flag==0:
        print('Yes')
    else :
        print('No')
else :
    print('No')

Buggy submission (verdict: Runtime Error):
N=int(input())
S=input()
flag=0

if N%2==0:
    for i in  range(0,int(N/2)):
        if S[i]!=S[i+3]:
            flag+=1

        if flag==0:
            print('Yes')
        else :
            print('No')
else :
    print('No')

Buggy submission (verdict: Runtime Error):
N=int(input())
S=input()
flag=0

for i in  range(0,int(N/2)):
    if S[i]!=S[i+3]:
        flag+=1

if flag==0:
    if N!=1:
        print('Yes')
    else :
        print('No')
else :
    print('No')
Problem p02951 (python)

Fixed submission:
x=input().split()

y=[0]*3

for i in range(3):
  y[i]=int(x[i])

ans=(y[2]-(y[0]-y[1]))

if ans>0:
  print(ans)
  
elif ans<=0:
  print(0)

Buggy submission (verdict: Runtime Error):
N=int(input())

ANS=[0]*5
flag=0

if N<100000:
    if N<10000:
        if N<1000:
            if N<100:
                if N<10:
                    ANS[0]=int(N%10)
                    flag=flag+1
                ANS[1]=9
                flag=flag+1
            ANS[2]=9+N-100+1
            flag=flag+1
        ANS[3]=909
        flag=flag+1
    ANS[4]=9+900+N-10000+1
    flag=flag+1
elif N==100000:
    print(90909)

if flag==5:
    print(ANS[0])
if flag==4:
    print(ANS[1])
if flag==3:
    print(ANS[2])
if flag==2:
    print(ANS[3])
if flag==1:
    print(ANS[4])

Buggy submission (verdict: Runtime Error):
N=int(input())

ANS=[0]*5
flag=0

if N<100000:
    if N<10000:
        if N<1000:
            if N<100:
                if N<10:
                    ANS[0]=int(N/10)
                    flag=flag+1
                ANS[1]=9
                flag=flag+1
            ANS[2]=9+N-100+1
            flag=flag+1
        ANS[3]=909
        flag=flag+1
    ANS[4]=9+900+N-10000+1
    flag=flag+1
elif N==100000:
    print(90909)

if flag==5:
    print(ANS[0])
if flag==4:
    print(ANS[1])
if flag==3:
    print(ANS[2])
if flag==2:
    print(ANS[3])
if flag==1:
    print(ANS[4])

Buggy submission (verdict: Runtime Error):
N=int(input())

ANS=[0]*6
flag=0

if N<100000:
    if N<10000:
        if N<1000:
            if N<100:
                if N<10:
                    ANS[0]=int(N/10)
                    flag=flag+1
                ANS[1]=9
                flag=flag+1
            ANS[2]=9+N-100+1
            flag=flag+1
        ANS[3]=909
        flag=flag+1
    ANS[4]=9+900+N-10000+1
    flag=flag+1
elif N==100000:
    ANS[5]
    print(90909)

if flag==5:
    print(ANS[0])
if flag==4:
    print(ANS[1])
if flag==3:
    print(ANS[2])
if flag==2:
    print(ANS[3])
if flag==1:
    print(ANS[4])

Buggy submission (verdict: Runtime Error):
x=input().split()

for i in range(3):
  y[i]=int(x[i])

y=[0]*3
ans=(y[2]-(y[0]-y[1]))

if ans>0:
  print(ans)
  
elif ans<0:
    print(0)

Buggy submission (verdict: Runtime Error):
x=input().split()

y=[0]*3

for i in range(3):
  y[i]=int(x[i])

if ans>y[2]-(y[0]-y[1]):
  print(ans)
  
elif ans<y[2]-(y[0]-y[1]):
    print(0)

Buggy submission (verdict: Runtime Error):
x=input().split()

for i in range(2):
  x[i]=int(x[i])
  
ans=(x[2]-(x[0]-x[1]))

if ans>0:
  print(ans)
  
  elif ans<0:
    print(ans-ans)

Buggy submission (verdict: Runtime Error):
x=input().split()

for i in range(2):
  x[i]=int(x[i])
  
ans=(x[2]-(x[0]-x[1]))

if ans>0:
  print(ans)
  
  elif ans<0:
    print(0)

Buggy submission (verdict: Runtime Error):
import sys
 
argv=sys.argv
 
x=[0]*3
for i in range(3):
	x[i]=(int)(argv[i+1])
    
print(x[2]-(x[0]-x[1]))
Problem p03041 (python)

Fixed submission:
N,K=map(int,input().split())
S=list(input())
ANS=' '

S[K-1]=S[K-1].lower()

for i in S:
    ANS+=i

print(ANS)

Buggy submission (verdict: Runtime Error):
N,K=map(int,input().split())
S=list(input())

S[K+1]=S[K+1].lower()

print(S)
Problem p03315 (python)

Fixed submission:
s=input()

print (s.count("+") - s.count("-"))

Buggy submission (verdict: Runtime Error):
S=input().split()

plus=0

for i in S:
    if S[i]=="+":
        plus+=1
    else :
        plus-=1

print(plus)
Problem p02790 (python)

Fixed submission:
#coding:utf-8

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


print(''.join([str(min(a, b))] * max(a, b)))

Buggy submission (verdict: Runtime Error):
#coding:utf-8

n = int(input())
nums = map(int, input().split(' '))

if a >= b:
    print(''.join([str(b)] * a))
else:
    print(''.join([str(a)] * b))
Problem p02793 (python)

Fixed submission:
#coding:utf-8

from fractions import gcd
n = int(input())
a = list(map(int, input().split(' ')))

mod = 10 ** 9 + 7

#最小公倍数を取得
g = a[0]
for num in a[1:]:
    g = g * num // gcd(num, g)

ans = 0
#計算後なのでmodオッケー
l = g % mod
for num in a:
    ans += l * pow(num, mod-2, mod)
    ans %= mod
print(ans % mod)

Buggy submission (verdict: Runtime Error):
#coding:utf-8

from fractions import gcd
n = int(input())
a = list(map(int, input().split(' ')))

mod = 10 ** 9 + 7

#最小公倍数を取得
g = a[0]
for num in a[1:]:
    g = g * num // gcd(num, g)

ans = 0
#計算後なのでmodオッケー
l = g % mod
for num in a:
    ans += l * pow(num, nod-2, mod)
    ans %= mod
print(ans % mod)
Problem p02831 (python)

Fixed submission:
#coding:utf-8

import fractions

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

print(int(a * b / fractions.gcd(a, b)))

Buggy submission (verdict: Runtime Error):
#coding:utf-8

import math

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

print(int(a * b / math.gcd(a, b)))
Problem p03295 (python)

Fixed submission:
#coding:utf-8

N,M = map(int,input().split())
List = sorted([list(map(int,input().split())) for i in range(M)], key=lambda x:x[1])

cnt = 1
maxa = 0
b = List[0][1]
for i in range(1,M):
    newB = List[i][1]
    maxa = max(maxa,List[i][0])
    if newB > b:
        if maxa >= b:
            cnt += 1
            b = newB
        maxa = 0
        
print(cnt)

Buggy submission (verdict: Runtime Error):
#coding:utf-8

N,M = map(int,input().split())

start,left = map(int,input().split())
right = left
cnt = 0
for i in range(M-1):
    data = list(map(int,input().split()))
    if data[0] != start:
        start = data[0]
        if data[1] >= left:
            cnt += 1
            left = data[1]
            right = left
    else:
        right = data[1]
    
if data[1] >= right:
    cnt += 1

print(cnt)

Buggy submission (verdict: Runtime Error):
#coding:utf-8
from bisect import bisect_right

N,M = map(int,input().split())

start,left = map(int,input().split())
right = left
cnt = 0
for i in range(M-1):
    data = list(map(int,input().split()))
    if data[0] != start:
        start = data[0]
        if data[1] >= left:
            cnt += 1
            left = data[1]
            right = left
    else:
        right = data[1]
    
if data[1] >= right:
    cnt += 1

print(cnt)
Problem p03307 (python)

Fixed submission:
#coding:utf-8
a = int(input())

def gcd(a, b):

	while b:

		a, b = b, a % b

	return a

g = gcd(a,2)
l = a * 2 // g
print(l)

Buggy submission (verdict: Runtime Error):
#coding:utf-8
n = int(input())
nums = list(map(int,input().split()))

nums = [num - i for i,num in enumerate(nums,1)]
nums.sort()

sums = [None for i in range(n)]
sums[0] = nums[0]
allv = sum(nums)
minv = nums[0] * (1 - n) - 2 * sums[0] + allv
for i in range(n-1):
    sums[i+1] = sums[i] + nums[i+1]
    for b in range(nums[i], nums[i+1]+1):
        p = b * (2*(i+1) - n) -2 * sums[i] + allv
        minv = min(minv,p)

print(minv)

Buggy submission (verdict: Runtime Error):
#coding:utf-8
import math
a = int(input())

gcd = math.gcd
g = gcd(a,2)
l = a * 2 // g
print(l)
Problem p03315 (python)

Fixed submission:
#coding:utf-8

s = input()
num = 0
for i in s:
    if i == "+":
        num += 1
    else:
        num -= 1
print(num)

Buggy submission (verdict: Runtime Error):
#coding:utf-8
K = int(input())
ten = K // 10
sur = K % 10
for i in range(ten+1):
    K += 1
    ten = K // 10
    sur = K % 10
    if i == ten:
        for j in range(1, sur+1):
            moji = "{}".format(j) + "9" * i
            print(moji)
    else:
        for j in range(1,10):
            moji = "{}".format(j) + "9" * i
            print(moji)
Problem p02771 (python)

Fixed submission:
a,b,c = map(int, input().split())
 
if (a == b) and (b !=c):
	print('Yes')
elif (a == c) and (b !=c):
	print('Yes')
elif (b == c) and (a !=c):
	print('Yes')
else:
	print('No')

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
x = 0
 
if (a==0) :
	print('DENIED')
elif (b.count(0) > 0):
	print('DENIED')
else:
  for i in b:
      if i % a == 0:
          x += 1
  if x == len(b):
      print('APPROVED')
  else:
      print('DENIED')

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

if (a==0) :
	print('DENIED')
elif (b.count(0) > 0):
	print('DENIED')
else:
  for i in b:
      if i % a == 0:
          x += 1
  if x == len(b):
      print('APPROVED')
  else:
      print('DENIED')
Problem p02771 (python)

Fixed submission:
ABC = input().split()

if len(set(ABC)) == 2:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
ABC = input().split()

if len(set(ABC)) == 2:
    print 'Yes'
else:
    print 'No'
Problem p02753 (python)

Fixed submission:
# -*- coding: utf-8 -*-

S = input()

if S == "AAA" or S == "BBB":
    print("No")
else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

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

a = int(A*100/8)
b = int(B*100/10)

x = int(a*0.10)
y = int(b*0.08)

if x == B and y == A:
    if a < b:
        print(a)
    else:
        print(b)
elif x == B:
    print(a)
elif y == A:
    print(b)
else:
    print(-1)
Problem p02771 (python)

Fixed submission:
a = input().split()
if(len(set(a))==2):
   print("Yes")
else:
   print("No")

Buggy submission (verdict: Runtime Error):
A, B, C = map(input().split())

if int(A) == int(B) == int(C):
  print("Yes")
else:
  print("No")
Problem p02779 (python)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
S = set(A)
if len(S)==len(A):
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
N = int(input())
A = map(int, input().split())
flag=0

for i in range(N): 
        for i1 in range(N): 
            if i != i1: 
                if A[i] == A[i1]: 
                    break
                else:
                  flag+=1

if flag>0:
  print("YES")
else:
  print("NO")
Problem p02785 (python)

Fixed submission:
N, K = map(int, input().split())
Hs = map(int,input().split())
print(sum(sorted(Hs, reverse=True)[K::]))

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
H = input().split()
total=0

if(K==len(H)):
  print(0)
else:
  temp = sorted(H)
  while K>0:
    temp=temp[:-1]
    K-=1
  for i in temp:
    total+=i
  print(total)
Problem p03041 (python)

Fixed submission:
n, k = map(int, input().split())
s = list(input())

if s[k-1] == 'A':
    s[k-1] = 'a'
elif s[k-1] == 'B':
    s[k-1] = 'b'
else:
    s[k-1] = 'c'

print(''.join(s))

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

if s[k-1] == 'A':
    s[k-1] = 'a'
elif s[k-1] == 'B'
    s[k-1] = 'b'
else:
    s[k-1] = 'c'

print(''.join(s))

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

if s[k-1] == 'A':
    s[k-1] = 'a'
elif s[k-1] == 'B'
    s[k-1] = 'b'
else:
    s[k-1] = 'c'

print(''.join(s))
Problem p03075 (python)

Fixed submission:
import sys

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

flag = 0

if((b-a)>k or (c-a)>k or (d-a)>k or (e-a)>k or (c-b)>k or (d-b)>k or (e-b)>k or (d-c)>k or (e-c)>k or (e-d)>k):
  print(":(")
else:
  print("Yay!")

Buggy submission (verdict: Runtime Error):
import sys

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

flag = 0

if((e-a)=<k):
 print("Yay!")
 flag = 1
if(flag == 1):
  print(":(")

Buggy submission (verdict: Runtime Error):
import sys

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

flag = 0

if((e-d)=<k):
  if((d-c)=<k):
    if((c-b)=<k):
      if((b-a)=<k):
        print("Yay!")
        flag = 1
if(flag == 1):
  print(":(")

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

flag = 0

if((e-d)>f or (d-c)>f or (c-b)>f or (b-a)>f):
  print(':(')
else:
  print('Yay!')

Buggy submission (verdict: Runtime Error):
str1 = input()
str2 = input()
str3 = input()
str4 = input()
str5 = input()
str6 = input()

flag = 0

if((str5-str4)>str6 or (str4-str3)>str6 or (str3-str2)>str6 or (str2-str1)>str6):
  print(':(')
else:
  print('Yay!')
Problem p02847 (python)

Fixed submission:
s=input()
if s=='SUN':
    print(7)
elif s=='MON':
    print(6)
elif s=='TUE':
    print(5)
elif s=='WED':
    print(4)
elif s=='THU':
    print(3)
elif s=='FRI':
    print(2)
elif s=='SAT':
    print(1)

Buggy submission (verdict: Runtime Error):
s=input()
if s='SUN':
    print(7)
elif s='MON':
    print(6)
elif s='TUE':
    print(5)
elif s='WED':
    print(4)
elif s='THU':
    print(3)
elif s='FRI':
    print(2)
elif s='SAT':
    print(1)

Buggy submission (verdict: Runtime Error):
s=(input())
if s='SUN':
    print(7)
elif s='MON':
    print(6)
elif s='TUE':
    print(5)
elif s='WED':
    print(4)
elif s='THU':
    print(3)
elif s='FRI':
    print(2)
elif s='SAT':
    print(1)

Buggy submission (verdict: Runtime Error):
s=int(input())
if s='SUN':
    print(7)
elif s='MON':
    print(6)
elif s='TUE':
    print(5)
elif s='WED':
    print(4)
elif s='THU':
    print(3)
elif s='FRI':
    print(2)
elif s='SAT':
    print(1)
Problem p02879 (python)

Fixed submission:
A,B = map(int, input().split())
 
if A<=9 and B<=9:
    print(A*B)
else:
    print(-1)

Buggy submission (verdict: Runtime Error):
A,B = map(int, input().split())
 
if 1 >=(A,B)<=9:
    print(A*B)
elif:
    print(-1)

Buggy submission (verdict: Runtime Error):
A,B = map(int, input().split())
 
if 1 >=A<=9 and 1>=B<=9:
    print(A*B)
elif:
    print(-1)

Buggy submission (verdict: Runtime Error):
A,B = map(int, input().split())

if 1 <=A,B >= 9:
    print(A*B)
else:
    print(-1)
Problem p02880 (python)

Fixed submission:
n=int(input())
for i in range(1,10):
  for j in range(1,10):
    if n==(i*j):
      print('Yes')
      exit()
print('No')

Buggy submission (verdict: Runtime Error):
a,b,n = map(int, input().split())
n=a*b
if a<=9 and b<=9:
    print('YES')
else:
    print('NO')
Problem p02757 (python)

Fixed submission:
N, P = map(int, input().split())
S = input()
U = [0]*P
ans = 0
if P == 2 or P == 5:
    for i in range(0, N):
        if int(S[i])%P == 0:
            ans += i+1
    print (ans)
else:
    t, s = 0, 1
    for i in range(N-1, -1, -1):
        t = (int(S[i])*s+t)%P
        U[t] += 1
        s = s*10%P
    for u in U:
        ans += u*(u-1)//2
    ans += U[0]
    print (ans)

Buggy submission (verdict: Runtime Error):
N, P = map(int, input().split())
S = input()
U = [0]*P
ans = 0
if P == 2 or P == 5:
    for i in range(0, N):
        if int(S[i])%P == 0:
            ans += i+1
    print (ans)
else:
    for _ in range(0, N):
        U[int(S)%P] += 1
        S = S.lstrip(S[0])
    for u in U:
        ans += u*(u-1)//2
    ans += U[0]
    print (ans)