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

Fixed submission:
def main():
    n, m = map(int, input().split())
    if m != 0:
        a = [int(input()) for _ in range(m)]
        a = set(a)
    else:
        a = set()
    
    s = [0] * (n+1)
    s[0] = 1
    s[1] = 1 if 1 not in a else 0

    for i in range(2, n+1):
        if i in a:
            continue
        s[i] = (s[i-1] + s[i-2]) % 1000000007

    print(s[n])

main()

Buggy submission (verdict: Runtime Error):
def main():
    n, m = map(int, input().split())
    a = [int(input()) for _ in range(m)]
    a = set(a)

    s[0] = 1
    s[1] = 1 if 1 not in a else 0

    for i in range(2, n+1):
        if i in a:
            continue
        s[i] = (s[i-1] + s[i-2]) % 1000000007

    print(s[n])

main()

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
a = [int(input()) for _ in range(m)]
a = set(a)

s[0] = 1
s[1] = 1 if 1 not in a else 0

for i in range(2, n+1):
    if i in a:
        continue
    s[i] = (s[i-1] + s[i-2]) % 1000000007

print(s[n])

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
a = [int(input()) for _ in range(m)]
a = set(a)

s[0] = 1
s[1] = 1 if n-1 not in a else 0

for i in range(2, n+1):
    if i in a:
        continue
    s[i] = (s[i-1] + s[i-2]) % 1000000007


print(s[n])
Problem p03017 (python)

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

if '##' in S[A-1:max(C, D)]:
    print('No')
elif C < D:
    print('Yes')
else:
    print('Yes' if '...' in S[B-2:D+1] else 'No')

Buggy submission (verdict: Runtime Error):
N, A, B, C, D = map(int, input().split())
S = input()
S += '#'

a = np.zeros(N+1)
b = np.zeros(N+1)
a[A-1] = 1
b[B-1] = 1

for i in range(N-1):
    if a[i] == 1:
        if S[i+1] == '.':
            a[i+1] = 1
        if S[i+2] == '.':
            a[i+2] = 1
    if b[i] == 1:
        if S[i+1] == '.':
            b[i+1] = 1
        if S[i+2] == '.':
            b[i+2] = 1
if C < D:
    # B
    print('Yes' if a[C-1] and b[D-1] else 'No')
else:
    print('Yes' if a[C-1] and b[D-1] and '...' in S else 'No')
Problem p03127 (python)

Fixed submission:
import numpy as np
import fractions
import sys
readline = sys.stdin.readline
read = sys.stdin.read

def II(): return int(input())
def LII(): return list(map(int, input().split()))

N = II()
A = LII()

b = min(A)
for a in A:
    b = fractions.gcd(a, b)
print(b)

Buggy submission (verdict: Runtime Error):
import numpy as np
import sys
readline = sys.stdin.readline
read = sys.stdin.read

def II(): return int(input())
def LII(): return list(map(int, input().split()))

N = II()
A = LII()
A = np.array(A)

if sum(A % 2) == 0:
    print(min(A))
else:
    a = min(A)
    AA = np.array(A)

    while True:
        AA = AA % a
        if len(AA[AA > 0]) > 0:
            a = min(AA[AA > 0])
        else:
            break
    A %= a
    print(min(A[A>0]))
Problem p03137 (python)

Fixed submission:
N, M = map(int, input().split())
X = list(map(int, input().split()))

if M <= N:
    print(0)
else:
    X.sort()
    L = []
    for i in range(M-1):
        L.append(X[i+1] - X[i])
    L.sort(reverse=True)
    print(X[-1]-X[0]-sum(L[:N-1]))

Buggy submission (verdict: Runtime Error):
if M <= N:
    print(0)
else:
    X.sort()
    L = []
    for i in range(M-1):
        L.append(X[i+1] - X[i])
    L.sort(reverse=True)
    print(X[-1]-X[0]-sum(L[:N-1]))
Problem p03774 (python)

Fixed submission:
N, M = map(int, input().split())
a, b = [], []
for _ in range(N):
    A, B = map(int, input().split())
    a.append(A)
    b.append(B)
    
c, d = [], []
for _ in range(M):
    C, D = map(int, input().split())
    c.append(C)
    d.append(D)
    
for A, B in zip(a, b):
    ans = 0
    mn = 10**9
    for i, (C, D) in enumerate(zip(c, d)):
        s = abs(A - C) + abs(B - D)
        if mn > s:
            ans = i
            mn = s
            
    print(ans+1)

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
a, b = [], []
for _ in range(N):
    A, B = map(int, input().split())
    a.append(A)
    b.append(B)
    
c, d = [], []
for _ in range(N):
    C, D = map(int, input().split())
    c.append(C)
    d.append(D)
    
for A, B in zip(a, b):
    ans = 0
    mn = 10**9
    for i, (C, D) in enumerate(zip(c, d)):
        s = abs(A - C) + abs(B - D)
        if mn > s:
            ans = i
            mn = s
            
    print(ans+1)
Problem p03821 (python)

Fixed submission:
import numpy as np

N = int(input())
A = np.zeros(N).astype(int)
B = np.zeros(N).astype(int)

for i in range(N):
    A[i], B[i] = map(int, input().split())

ans = 0
for i in reversed(range(N)):
    A[i] = A[i] + ans
    if A[i] % B[i] == 0:
        continue
    elif B[i] - A[i] > 0:
        ans += B[i] - A[i]
    else:
        ans += B[i] - (A[i] % B[i])
    
print(ans)

Buggy submission (verdict: Runtime Error):
import numpy as np

N = int(input())
A = np.zeros(N).astype(int)
B = np.zeros(N).astype(int)

for i in range(N):
    A[i], B[i] = map(int, input().split())

ans = 0
for i in reversed(range(N)):
  	A[i] = A[i] + ans
    if A[i] % B[i] == 0:
        continue
    elif B[i] - A[i] > 0:
        ans += B[i] - A[i]
    else:
        ans += B[i] - (A[i] % B[i])
    
print(ans)
Problem p02754 (python)

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

C = N // (A + B)
D = N % (A + B)

R = C * A + min(A, D)
print(R)

Buggy submission (verdict: Runtime Error):
from collections import Counter

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

C = N // (A + B) + (0 if N % (A + B) == 0 else 1)

L = []
Co = Counter()
for n in range(C):
    L += ['b'] * A + ['r'] * B

Co = Counter(L[:N])

print(Co['b'])
Problem p02771 (python)

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

if len(set([A, B, C])) == 2:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
# from functools import reduce

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

R = reduce(lambda x, y: x and y, [n % 3 == 0 or n % 5 == 0 for n in AL if n % 2 == 0])

if R:
    print('APPROVED')
else:
    print('DENIED')
Problem p03834 (python)

Fixed submission:
s = input()
print(s.replace(',', ' '))

Buggy submission (verdict: Runtime Error):
s = input()
print(s.replase(',', ' '))
Problem p03041 (python)

Fixed submission:
n, k = map(int, input().split())
string = str(input())
arr = list(string)
arr[k-1] = arr[k-1].lower()
print(*arr, sep="")

Buggy submission (verdict: Runtime Error):
total, index = map(int, input().split())
string = list(map(str, input().split()))
string[index-1] = string[index-1].lower()
print(string)
Problem p02623 (python)

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

a,b=[0],[0]
for i in range(N):
    a.append(a[i]+A[i])
for i in range(M):
    b.append(b[i]+B[i])

ans,j =0,M
for i in range(N+1):
    if a[i]>K:
        break
    while b[j]>K-a[i]:
        j-=1
    ans =max(ans,i+j)
print(ans)

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

a,b=[0],[0]
for i in range(N):
    a.append(a[i]+A[i])
for i in range(M):
    b.append(b[i]+B[i])

ans,j =0,M
for i in range(N+1):
    if a[i]>K:
        break
    while b[j]>K-a[i]:
        j-=i
    ans =max(ans,i+j)
print(ans)
Problem p02624 (python)

Fixed submission:
from  numba import njit

@njit
def main(N):
    count=0
    for n in range(1 ,N+1):
        for m in range(n,N+1,n):
            count+=m
    print(count)
if __name__ == "__main__":
    N = int(input())
    main(N)

Buggy submission (verdict: Runtime Error):
from  numba import njit

@njit
def main(N):
    count=0
    for n in range(1 ,N+1):
        for m in range(n,N+1,n):
            count+=m
    print(count)
if __name__ == "__main__":
    N = int(input())
    main(N)

Buggy submission (verdict: Runtime Error):
import numpy as np
from  numba import njit
from time import time

@njit
def main(N):
    count=0
    for n in range(1 ,N+1):
        for m in range(n,N+1,n):
            count+=m
    print(count)
if __name__ == "__main__":
    N = int(input())
    main(N)

Buggy submission (verdict: Runtime Error):
import numpy as np
from time import time
def main():
    N = int(input())
# div=np.zeros(N+1,np.int64)
    count=0
    for n in range(1 ,N+1):
        for m in range(n,N+1,n):
            count+=m
    print(count)
if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import numpy as np
N = int(input())
# div=np.zeros(N+1,np.int64)
count=0
for n in range(1 ,N+1):
    for m in range(n,N+1,n):
        count+=m
print(count)

Buggy submission (verdict: Runtime Error):
import numpy as np
N = int(input())
div=np.zeros(N+1,np.int64)
for n in range(1 ,N+1):
    for m in range(n,N+1,n):
        div[m]+=m
print(div.sum())
Problem p02623 (python)

Fixed submission:
import sys
import bisect
import itertools
import collections
import fractions
import heapq
import math
from operator import mul
from functools import reduce
from functools import lru_cache


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    N, M, K = map(int, readline().split())
    A = list(map(int, readline().split()))
    B = list(map(int, readline().split()))


    nowtime = 0

    Asum = [0]
    Bsum = [0]
    tmp = 0
    for a in A:
        tmp += a
        Asum.append(tmp)
    tmp = 0
    for b in B:
        tmp += b
        Bsum.append(tmp)

    maxbooks = 0
    before = M
    bcount = M
    for acount in range(N+1):
        if Asum[acount] > K:
            continue
        while K < Asum[acount] + Bsum[bcount]:
            bcount -= 1
        maxbooks = max(maxbooks, acount+bcount)

    print(maxbooks)

if __name__ == '__main__':
    solve()

Buggy submission (verdict: Runtime Error):
#n = int(input())
n,m,k = [int(z) for z in input().split()]
a = [int(z) for z in input().split()]
b = [int(z) for z in input().split()]
time = 0
i = j = 0
while (time<=k and i<n and j<m):
      #print(i,j,time)
      if (a[i]<b[j]):
            if (time+a[i]<=k):
                  time += a[i]
                  i+=1
            else:
                  break
      else:
            if (time+b[j]<=k):
                  time += b[j]
                  j+=1
            else:
                  break
while (i<n and time<=k):
      if (time+a[i]<=k):
                  time += a[i]
                  i+=1
      else:
            break
while (j<n and time<=k):
      if (time+b[j]<=k):
                  time += b[j]
                  j+=1
      else:
            break
print(i+j)

Buggy submission (verdict: Runtime Error):
#n = int(input())
n,m,k = [int(z) for z in input().split()]
a = [int(z) for z in input().split()]
b = [int(z) for z in input().split()]
time = 0
i = j = 0
while (time<=k and i<n and j<m):
      if (a[i]>b[j]):
            if (time+a[i]<=k):
                  time += a[i]
                  i+=1
            else:
                  break
      else:
            if (time+b[j]<=k):
                  time += b[j]
                  j+=1
            else:
                  break
while (i<n and time<=k):
      if (time+a[i]<=k):
                  time += a[i]
                  i+=1
      else:
            break
while (j<n and time<=k):
      if (time+b[j]<=k):
                  time += b[j]
                  j+=1
      else:
            break
print(i+j)
Problem p02729 (python)

Fixed submission:
x,y = [int(x) for x in input().split()]
def c(m):
      if (m>=2):
            return m*(m-1)//2
      else:
            return 0
if (x<2 and y<2):
      print(0)
else:
      print(c(x)+c(y))

Buggy submission (verdict: Runtime Error):
x,y = [int(x) for x in input().split()]
def c(m):
      if (m>=2):
            return m*(m-1)//2
      else:
            return 0
if (x<2 and y<2):
      print(s)
else:
      print(c(x)+c(y))
Problem p02829 (python)

Fixed submission:
#x = [int(x) for x in input().split()]
x = int(input())
y = int(input())
z = [1,2,3]
del(z[z.index(x)])
del(z[z.index(y)])
print(z[0])

Buggy submission (verdict: Runtime Error):
#x = [int(x) for x in input().split()]
x = int(input())
y = int(input())
z = [1,2,3]
del(z.index(x))
del(z.index(y))
print(z[0])
Problem p02879 (python)

Fixed submission:
a,b = map(int, input().split())
if (a<10 and b<10):
      print(a*b)
else:
      print(-1)

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split())
if (a<10 && b<10):
      print(a*b)
else:
      print(-1)
Problem p02834 (python)

Fixed submission:
import sys
sys.setrecursionlimit(1000000)
n,u,v=map(int,input().split())
E=[[] for _ in range(n+1)]
for _ in range(n-1):
    a,b=map(int,input().split())
    E[a].append(b)
    E[b].append(a)
depth=[-1]*(n+1)
dis=[-1]*(n+1)
def dsf_1(p,d):
    depth[p]=d
    for c in E[p]:
        if depth[c]==-1:
            dsf_1(c,d+1)
dsf_1(v,0)
def dsf_2(p,d):
    dis[p]=d
    for c in E[p]:
        if dis[c]==-1:
            dsf_2(c,d+1)
dsf_2(u,0)
ans=0
for i in range(1,n+1):
    if len(E[i])==1 and i!=v:
        if dis[i]<depth[i]:
           ans=max(ans,depth[i]-1)
print(ans)

Buggy submission (verdict: Runtime Error):
n,u,v=map(int,input().split())
E=[[] for _ in range(n+1)]
for _ in range(n-1):
    a,b=map(int,input().split())
    E[a].append(b)
    E[b].append(a)
depth=[-1]*(n+1)
dis=[-1]*(n+1)
def dsf_1(p,d):
    depth[p]=d
    for c in E[p]:
        if depth[c]==-1:
            dsf_1(c,d+1)
dsf_1(v,0)
def dsf_2(p,d):
    dis[p]=d
    for c in E[p]:
        if dis[c]==-1:
            dsf_2(c,d+1)
dsf_2(u,0)
ans=0
for i in range(1,n+1):
    if len(E[i])==1 and i!=v:
        if dis[i]<depth[i]:
           ans=max(ans,depth[i]-1)
print(ans)

Buggy submission (verdict: Runtime Error):
n,u,v=map(int,input().split())
E=[[] for _ in range(n+1)]
for _ in range(n-1):
    a,b=map(int,input().split())
    E[a].append(b)
    E[b].append(a)
depth=[-1]*(n+1)
dis=[-1]*(n+1)
def dsf_1(p,d):
    depth[p]=d
    for c in E[p]:
        if depth[c]==-1:
            dsf_1(c,d+1)
dsf_1(v,0)
def dsf_2(p,d):
    dis[p]=d
    for c in E[p]:
        if depth[c]==-1:
            dsf_2(c,d+1)
dsf_2(u,0)
ans=0
for i in range(1,n+1):
    if len(E[i])==1 and i!=v:
        if dis[i]<depth[i]:
           ans=max(ans,depth[i]-1)
print(ans)

Buggy submission (verdict: Runtime Error):
n,u,v=map(int,input().split())
E=[[] for _ in range(n+1)]
for _ in range(n-1):
    a,b=map(int,input().split())
    E[a].append(b)
    E[b].append(a)
depth=[-1]*(n+1)
height=[-1]*(n+1)
def dsf_1(p,d):
    depth[p]=d
    for c in E[p]:
        if depth[c]==-1:
            dsf_1(c,d+1)
dsf_1(v,0)
def dsf_2(p):
    if len(E[p])==1 and p!=v:
        height[p]=0
    else:
        h=0
        for c in E[p]:
            if height[c]==-1 and depth[c]>depth[p]:
                dsf_2(c)
            h=max(h,height[c])
        h+=1
        height[p]=h
dsf_2(v)
d=depth[u]
dd=d//2+1
while d>dd:
    for c in E[u]:
        if depth[c]==d-1:
            u=c
            d-=1
            break
print(height[u]+depth[u]-1)
Problem p02912 (python)

Fixed submission:
import heapq
n,m=map(int,input().split())
A=list(map(int,input().split()))
hq=[]
for i in A:
  heapq.heappush(hq,-i)
for _ in range(m):
  m=-((-heapq.heappop(hq))//2)
  heapq.heappush(hq,m)
print(-sum(hq))

Buggy submission (verdict: Runtime Error):
import bisect
n,m=map(int,input().split())
A=sorted(list(map(int,input().split())))
c=A.pop()//2
l=[c]
for _ in range(m-1):
  c=l.pop()
  if c>=A[-1]:
    c//=2
    bisect.insort_left(l,c)
  else:
    l+=[c]
    c=A.pop()//2
    bisect.insort_left(l,c)
print(sum(A)+sum(l))
Problem p03013 (python)

Fixed submission:
n,m=map(int,input().split())
a=set([int(input()) for i in range(m)])
dp=[0]*(n+1)
dp[0]=1
for i in range(1,n+1):
    dp[i]=(dp[i-1]+dp[i-2])%(10**9+7)
    if i in a:
      dp[i]=0
print(dp[n])

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
fib=[0]*(n+1)
fib[0]=0
fib[1]=1
for i in range(n-1):
  fib[i+2]=fib[i]+fib[i+1]
ans=1
k=0
for i in range(m):
  a=int(input())
  ans*=fib[a-k]
  k=a+1
ans*=fib[n-k+1]
print(ans%1000000007)
Problem p03209 (python)

Fixed submission:
N,X=map(int,input().split())
a,p=[1],[1]
for i in range(N):
    a.append(a[i]*2+3)
    p.append(p[i]*2+1)
def f(n,x):
    if n==0:return 0 if x<=0 else 1
    elif x<=1+a[n-1]:return f(n-1,x-1)
    else:return p[n-1]+1+f(n-1,x-2-a[n-1])
print(f(N,X))

Buggy submission (verdict: Runtime Error):
n,x=map(int,input().split())
a=[1]
p=[1]
for i in range(n-1):
    a.append(a[i]*2+3)
    p.append(p[i]*2+1)
def f(n,x):
  if n==0 and x==1:
    return 1
  elif n==0:
    return 0
  elif x<=1:
    return 0
  elif x<=1+a[n-]:
    return f(n-1,x-1)
  else:
    return p[n-1]+1+f(n-1,x-2-a[n-1])
print(f(n,x))

Buggy submission (verdict: Runtime Error):
n,x=map(int,input().split())
a=[1]
p=[1]
for i in range(n-1):
    a.append(a[i]*2+3)
    p.append(p[i]*2+1)
def f(n,x):
  if n==0 and x=1:
    return 1
  elif n==0:
    return 0
  elif x<=1+a[n-1]:
    return f(n-1,x-1)
  else:
    return p[n-1]+1+f(n-1,x-2-a[n-1])
print(f(n,x))
Problem p03250 (python)

Fixed submission:
a,b,c=map(int,input().split())
print(max(a,b,c)*9+a+b+c)

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
print(max(a,b,c)*9+a+b+C)
Problem p02622 (python)

Fixed submission:
s = str(input())
t = str(input())

sl = len(s)

count = 0

for i in range(0,sl):
  if s[i] != t[i]:
      count += 1

print(count)

Buggy submission (verdict: Runtime Error):
s = str(input())
t = str(input())

count = 0

for i in range s:
  if s[i] != t[i]
  count += 1
  
print(count)
Problem p02627 (python)

Fixed submission:
a = input()

if a.isupper():
  print("A")
else:
  print("a")

Buggy submission (verdict: Runtime Error):
a = str(input())

if str.isupper() == True:
  print("A")
else:
  print("a")
Problem p02915 (python)

Fixed submission:
n = int(input())

print(n ** 3)

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

print(n ** 3)
Problem p02622 (python)

Fixed submission:
s = input()
t = input()
result = len([a for a,b in zip(s,t) if a != b])
print(result)

Buggy submission (verdict: Runtime Error):
s = input()
t = input()
result = len([_ for a,b in zip(s,t) if a != b])
print(result)

Buggy submission (verdict: Runtime Error):
s = input()
t = input()
result = len([e for a,b in zip(s,t) if a != b])
print(result)

Buggy submission (verdict: Runtime Error):
s = input()
t = input()
result = len([e for a,b in zip(s,t) if a != b])
print(result)

Buggy submission (verdict: Runtime Error):
s  = input()
t = input()
result = len([e for a,b in zip(s,t) if a != b])
print(result)

Buggy submission (verdict: Runtime Error):
s  = input()
t = input()
result = len([e for a,b in zip(s,t) if a != b])
print(result)

Buggy submission (verdict: Runtime Error):
s  = input()
t = input()
result = len([a,b for a,b in zip(s,t) if a != b])
print(result)
Problem p02777 (python)

Fixed submission:
s,t = input().split()
sn,tn = map(int,input().split())
u  = input()

if s == u:
    print(str(sn-1) + ' '+ str(tn))
else:
    print(str(sn) + ' ' + str(tn-1))

Buggy submission (verdict: Runtime Error):
s,t = input().split()
sn,tn = map(int,input().split())
u  = input()

if s == u:
    print((sn-1) + ' '+ tn)
else:
    print(sn + ' ' + (tn-1))

Buggy submission (verdict: Runtime Error):
s,t = input().split()
sn,tn = map(int,input().split())
u  = input()

if s == u:
	print((sn-1) ' '+ (tn))
else:
	print(sn + '' + (tn-1))
Problem p02897 (python)

Fixed submission:
from math import ceil
n= int(input())
print(ceil(n/2)/n)

Buggy submission (verdict: Runtime Error):
from math import ceil
n= input()
print(ceil(n/2)/n)
Problem p02629 (python)

Fixed submission:
N = int(input()) 

ans='' 

while N>0:
	N -= 1
	ans += chr(ord('a') + N % 26) 
	N = N//26
    
print(ans[::-1])

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

ans='' 

while N>0:
	N -= 1
	ans += chr(ord('a') + N % 26) 
    N  = N//26
    
print(ans[::-1])

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

ans='' 

while N>0:
	N -= 1
	ans += chr(ord('a') + N % 26) 
    N //= 26
    
print(ans[::-1])

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

ans='' 

while N>0:
	N -= 1
	ans += chr(ord('a') + N % 26) 
    N //= 26
    
print(ans[::-1])
Problem p02699 (python)

Fixed submission:
s,w = map(int,input().split())

if s<=w:
  print('unsafe')
else:
  print('safe')

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

if s<=W:
  print('unsafe')
else:
  print('safe')
Problem p02711 (python)

Fixed submission:
num = input();

if num[0] == "7" or num[1] == "7" or num[2] == "7" :
  print("Yes");
else:
  print("No");

Buggy submission (verdict: Runtime Error):
N = input();
  
if N[0] == "7" or N[1] == "7" or N[2] == "7":
    print("Yes");
  else:
    print("No");

Buggy submission (verdict: Runtime Error):
N = input()
  
if N[0] == "7" or N[1] == "7" or N[2] == "7":
    print("Yes")
  else:
    print("No")

Buggy submission (verdict: Runtime Error):
N = input()
  
if N[0] == 7 or N[1] == 7 or N[2] == 7:
    print("Yes")
  else:
    print("No")

Buggy submission (verdict: Runtime Error):
N = input()
 
a = int(N/100)
b = int( (N-a*100)/10 )
c = int(N-a*100-b*10)
 
if( a == 7 or b == 7 or c == 7 ):
    print("Yes")
  else:
    print("No")

Buggy submission (verdict: Runtime Error):
N = input()
 
a = int(N/100)
b = int( (N-a*100)/10 )
c = int(N-a*100-b*10)
 
if a == 7 or b == 7 or c == 7:
    print("Yes")
  else:
    print("No")

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

a = int(N/100)
b = int( (N-a*100)/10 )
c = int(N-a*100-b*10)

if a == 7 or b == 7 or c == 7
    print("Yes")
  else print("No")
Problem p02729 (python)

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

x = int( N*(N-1)/2 + M*(M-1)/2 )

print(x)

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

x = int( N*(N-1)/2 + M*(M-1)/2 )

print(x)
Problem p02753 (python)

Fixed submission:
x = input()

if x[0]==x[1]==x[2]:
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
x = str(input())

if x="AAA" or x="BBB":
  print("Yes")
else:
  print("No")
Problem p02754 (python)

Fixed submission:
n, a, b = map(int, input().split())
quo = n // (a+b)
rem = n % (a+b)
ans = quo*a
if rem == 0:
    print(ans)
elif rem < a:
    print(ans + rem)
else:
    print(ans + a)

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

x = n//(a+b)
y = (n-x*(a+b))//a

if y!=0:
  print(a*x+a)
else:
  print(a*x+n-(a+b)*x)
Problem p02759 (python)

Fixed submission:
n = int(input())

ans = n//2 +n%2

print(ans)

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

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

Fixed submission:
s,t = map(str,input().split())
a,b = map(int,input().split())
u =input()

if u==s:
  a -=1
else:
  b -=1
  
print(a,b)

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

if s==u:
  print( a-1,b)
else:
  print( a,b-1)

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

if s==u:
  print( str(a-1) +" "+ str(b) )
else:
  print( str(a) +" "+ str(b-1) )
Problem p02829 (python)

Fixed submission:
a = int(input())
b = int(input())

print(6-a-b)

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

print(6-a-b)

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

print(6-a-b)
Problem p02847 (python)

Fixed submission:
s = str(input())

days = ['SUN','MON','TUE','WED','THU','FRI','SAT']

print(7-days.index(s))

Buggy submission (verdict: Runtime Error):
s = str(input())

days = ['SUN','MON','TUE','WED','THU','FRI','SAT']

k=1
while k<=7:
  if s==days[k]:
    print(k)
  else:
    k+=1

Buggy submission (verdict: Runtime Error):
s = str(input())

days = [SUN,MON,TUE,WED,THU,FRI,SAT]

k=1
while k<=7:
  if s==days[k]:
    print(k)
  else:
    k+=1
Problem p02897 (python)

Fixed submission:
n = int(input())

if n%2==0:
  print(1/2)
else:
  print((n+1)/(2*n))

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

if n%2==0:
  print(0.5)
else:
  print((n+1)/2n)

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

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

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

if n%2==0:
  print(1/2)
else:
  print((n-1)/2n)