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

Fixed submission:
if __name__=="__main__":
    a, b = list(map(int, input().split(" ")))
    if(a==1):
        a = 14
    if(b==1):
        b = 14
    if(a > b):
        print("Alice")
    elif(a == b):
        print("Draw")
    else:
        print("Bob")

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

if __name__=="__main__":
    inputs_number  = lambda : [int(x) for x in input().split()]
    N, Ma, Mb = inputs_number()
    drugs = [inputs_number() for i in range(N)]
    inf = 100*N + 1
    dp = np.ones((N+1,N*10+1,N*10+1)) * inf
    dp[0,0,0] = 0.0

    for i in range(N):
	for ca in range(N*10+1):
            for cb in range(N*10+1):
		if(dp[i,ca,cb]==inf):
                    continue
                dp[i+1,ca,cb]=np.min([dp[i+1,ca,cb],dp[i,ca,cb]])
                dp[i+1,ca+drugs[i][0],cb+drugs[i][1]]=np.min([dp[i+1,ca+drugs[i][0],cb+drugs[i][1]],dp[i,ca,cb]+drugs[i][2]])

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

if __name__=="__main__":
    inputs_number  = lambda : [int(x) for x in input().split()]
    N, Ma, Mb = inputs_number()
    drugs = np.array([inputs_number() for i in range(N)])

    inf = 100*N + 1
    dp = np.ones((N,N*10,N*10)) * inf
    dp[0,0,0] = 0
    for i in range(0, N-1):
	for ca in range(N*10):
            for cb in range(N*10):
		if(dp[i,ca,cb]==inf):
                    continue
		dp[i+1,ca,cb]=np.min([dp[i+1,ca,cb],dp[i,ca,cb]]);
		dp[i+1,ca+drugs[i,0],cb+drugs[i,1]]=np.min([dp[i+1,ca+drugs[i,0],cb+drugs[i,1]],dp[i,ca,cb]+drugs[i,2]]);

    ans = inf
    for i in range(1, N):
	for ca in range(1, N*10):
            for cb in range(1, N*10):
		if(Ma*cb == Mb*ca and dp[i,ca,cb] < ans):
                    ans = dp[i,ca,cb]
    if(ans==inf):
	ans = -1
    print(int(ans))

Buggy submission (verdict: Runtime Error):
if __name__=="__main__":
    a, b = list(map(int, input().split(" ")))
    if(a == 1):
	a = 14
    if(b == 1):
	b = 14
    if(a > b):
        print("Alice")
    elif(a == b):
        print("Draw")
    else:
        print("Bob")

Buggy submission (verdict: Runtime Error):
import sys
if __name__=="__main__":
    a, b = list(map(int, input().split(" ")))
    if(a == 1):
	a = 14
    if(b == 1):
	b = 14
    if(a > b):
        sys.stdout.write("Alice")
    elif(a == b):
        sys.stdout.write("Draw")
    else:
        sys.stdout.write("Bob")

Buggy submission (verdict: Runtime Error):
import sys
if __name__=="__main__":
    a, b = list(map(int, input().split(" ")))
    if(a > b):
	sys.stdout.write("Alice")
    elif(a == b):
	sys.stdout.write("Draw")
    else:
	sys.stdout.write("Bob")

Buggy submission (verdict: Runtime Error):
import sys
if __name__=="__main__":
    a, b = list(map(int, input().replace("\n","").split(" ")))
    if(a > b):
	sys.stdout.write("Alice")
    elif(a == b):
	sys.stdout.write("Draw")
    else:
	sys.stdout.write("Bob")

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

if __name__=="__main__":
    a, b = list(map(int, input().replace("\n","").split(" ")))
    if(a > b):
	print("Alice")
    elif(a == b):
	print("Draw")
    else:
	print("Bob")
Problem p03038 (python)

Fixed submission:
N,M = map(int,input().split())
A = list(map(int,input().split()))
A.sort()
#print(A)
X = [0 for i in range(N)]
CB = []
for i in range(M):
    b,c = map(int,input().split())
    CB.append([c,b])
CB.sort(reverse=True)
#print(CB)
index = 0
for i in range(M):
    for j in range(CB[i][1]):
        A[index] = max(A[index],CB[i][0])
        if index != N - 1:
            index += 1
            continue
        else:
            print(sum(A))
            exit()
print(sum(A))

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
A = list(map(int,input().split()))
A.sort()
#print(A)
X = [0 for i in range(N)]
CB = []
for i in range(M):
    b,c = map(int,input().split())
    CB.append([c,b])
CB.sort(reverse=True)
#print(CB)
index = 0
for i in range(M):
    for j in range(CB[i][1]):
        A[index] = max(A[index],CB[i][0])
        index += 1
        if index != N - 1:
            continue
        else:
            print(sum(A))
            exit()
print(sum(A))

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
A = list(map(int,input().split()))
A.sort()
#print(A)
CB = []
for i in range(M):
    b,c = map(int,input().split())
    CB.append([c,b])
CB.sort(reverse=True)
#print(CB)

ans = 0
for i in range(M):
    if A[CB[i][1]-1] < CB[i][0]:
        ans += CB[i][0] * CB[i][1]
        for j in range(CB[i][1]):
            A.pop(0)
    else:
        for j in range(CB[i][1]):
            if A[0] < CB[i][0]:
                ans += CB[i][0]
                A.pop(0)
                continue
            else:
                ans += sum(A)
                A = []
                break
        break

if len(A) != 0:
    ans += sum(A)

print(ans)
Problem p02777 (python)

Fixed submission:
S, T = input().split()
A, B = map(int,input().split())
U = input()
if U == S:
  print(A-1, B)
elif U == T:
  print(A, B-1)

Buggy submission (verdict: Runtime Error):
n = int(input())
*l, = map(int, input().split())
def has_duplicates(seq):
    return len(seq) != len(set(seq))
S = has_duplicates(l)
if str(S) == 'False':
  print('YES')
elif str(S) == 'True':
  print('NO')

Buggy submission (verdict: Runtime Error):
n = int(input())
*l, = map(int, input().split())
L = sorted(l)
S = 0
for i in range(n):
  for l in range(n):
    if L[i] == L[l]:
      S = 1
if S == 0:
  print('Yes')
elif S == 1:
  print('No')
Problem p03038 (python)

Fixed submission:
import sys
N, M = map(int, sys.stdin.readline().split())
A = [[1, i] for i in list(map(int, sys.stdin.readline().split()))]
BC = [list(map(int, sys.stdin.readline().split())) for _ in range(M)]

card_list = A + BC
sorted_cards = sorted(card_list, key=lambda x: x[1], reverse=True)
n = 0
cards_sum = 0
for i in range(N):
    if sorted_cards[i][0] + n <= N:
        cards_sum += sorted_cards[i][1] * sorted_cards[i][0]
        n += sorted_cards[i][0]
    elif n < N and sorted_cards[i][0] + n > N:
        cards_sum += sorted_cards[i][1] * (N - n)
        n = N
        break
    else:
        break

print(cards_sum)

Buggy submission (verdict: Runtime Error):
import sys
N, M = map(int, sys.stdin.readline().split())
A = sorted(list(map(int, sys.stdin.readline().split())))
B = []
C = []
for _ in range(M):
    b, c = map(int, sys.stdin.readline().split())
    B.append(b)
    C.append(c)

card_list = [0] * (N + sum(B))
card_list[:N] = A
start = N
for i in range(M):
    list = [C[i]] * B[i]
    card_list[start:start + len(list)] = list
    start = start + len(list)
    
sorted_cards = sorted(card_list, reverse=True)
ans = sum(sorted_cards[:N])
print(ans)
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'

ans = ''.join(S)
print(ans)

Buggy submission (verdict: Runtime Error):
N, K = map(int,input().split())
S = 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(S)
Problem p03072 (python)

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

count = 0
h = H[0]

for i in range(N):
    if h <= H[i]:
        count += 1
        h = H[i]

print(count)

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

count = 0
h = H[0]

for i in range(H):
    if h <= H[i]:
        count += 1
        h = H[i]

print(count)
Problem p03073 (python)

Fixed submission:
S = input()
c1 = 0
c2 = 0

for i in range(len(S)):
    if i == 0:
        s1 = '0'
        s2 = '1'
    elif i % 2 == 1:
        s1 += '1'
        s2 += '0'
    else:
        s1 += '0'
        s2 += '1'

for i in range(len(S)):
    if S[i] == s1[i]:
        c2 += 1
    else:
        c1 += 1

print(min(c1, c2))

Buggy submission (verdict: Runtime Error):
S = input()
s1 = '0'
s2 = '1'
c1 = 0
c2 = 0

for i in range(len(S)):
    if i == 0:
        s1 = '0'
        s2 = '1'
    elif i % 2 == 1:
        s1 += 1
        s2 += 0
    else:
        s1 += 0
        s2 += 1

for i in range(len(S)):
    if S[i] == s1[i]:
        c2 += 1
    else:
        c1 += 1

print(min(c1, c2))
Problem p03075 (python)

Fixed submission:
a = int(input())
b= int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if e - a > k:
    print(':(')
else:
    print('Yay!')

Buggy submission (verdict: Runtime Error):
a = int(intpu())
b= int(intpu())
c = int(intpu())
d = int(intpu())
e = int(intpu())
k = int(intpu())

if e - a > k:
    print(':(')
else:
    print('Yay!')
Problem p02577 (python)

Fixed submission:
if __name__=='__main__':
    N = int(input())
    print("Yes" if N%9 ==0 else "No")

Buggy submission (verdict: Runtime Error):
if __name__=='__main__':
    N = int(input())
        #pc, pr = map(int, input().split())
        #N = list(map(int,input().split()))
	print("Yes" if N%9 ==0 else "No")

Buggy submission (verdict: Runtime Error):
if __name__=='__main__':
    for i in range(int(input())):
        N = int(input())
        #pc, pr = map(int, input().split())
        #N = list(map(int,input().split()))
        print("Yes" if N%9 ==0 else "No")
Problem p02766 (python)

Fixed submission:
N,K=map(int,input().split())
a = 1
while K <= N:
  N = N // K
  a =a+1
  
print(a)

Buggy submission (verdict: Runtime Error):
N,K=map(int,input().split())
 
while K <= N:
  N = N // K
  a +=a
 
print(a)

Buggy submission (verdict: Runtime Error):
N,K=map(int,input().split())
a = 0
while R <= N:
  N = N // R
  a +=a
 
print(a)

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

while R <= N:
  N = N // R
  a +=a

print(a)
Problem p02659 (python)

Fixed submission:
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(float,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

A,B = input().split()
A = int(A)
B = B.replace(".","")
B = int(B)

print(A*B // 100)

Buggy submission (verdict: Runtime Error):
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(float,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

A,B = input().split()
A = int(A)
B = int(B * 100)

print(A*B // 100)
Problem p02707 (python)

Fixed submission:
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
import fractions
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

n = I()
A = LI()

cnt = [0] * n

sa = set(A)
csa = Counter(A)

for v in sa:
    if cnt[v-1] != 0:
        continue
    cnt[v-1] = csa[v]

for c in cnt:
  print(c)

Buggy submission (verdict: Runtime Error):
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
import fractions
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

n = I()
A = LI()

cnt = [0] * n

for i in range(n-1):
    if cnt[A[i]-1] == 0:
        cnt[A[i]-1] = A.count(A[i])

for c in cnt:
  print(c)
Problem p02753 (python)

Fixed submission:
list = str(input())

if list == 'AAA' or list == 'BBB' or len(list) != 3:
    print("No")
else : 
    print("Yes")

Buggy submission (verdict: Runtime Error):
nums = list(map(int, input().split()))
n = nums[0]
a = nums[1]
b = nums[2]

if a == 0:
    print(0)
elif b == 0:
    print(n)
else:
   print(n / (a+b) * a)

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

if list is "AAA" or list is "BBB" or len(list(list)) is not 3:
    print("No")
else : 
    print("Yes")
Problem p02785 (python)

Fixed submission:
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

n, k = MI()

h = FLI()
h.sort(reverse = True)
print(sum(h[k:]))

Buggy submission (verdict: Runtime Error):
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

n, k = MI()

h = np.array(sorted([int(i) for i in input().split()]))
hmax = h.max()

if k >= len(h):
    print(0)
    exit()

h = np.delete(h, len(h) - k)
print(np.sum(h))
Problem p02935 (python)

Fixed submission:
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

n = I()
v = LI()
vs = sorted(v)

def kati(x,y):
    return (x+y)/2

result = vs[0]
cv = 0
for i in range(1, n):
    result = kati(result, vs[i])

print(result)

Buggy submission (verdict: Runtime Error):
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

n = I()
v = LI()
vs = sorted(v)

def kati(x,y):
    return (x+y)/2

result = []
for i in range(2, n):
    t = kati(kati(vs[i-2], vs[i-1]), vs[i])
    result.append(t)

ans = max(result)
print(ans)
Problem p02951 (python)

Fixed submission:
a, b, c = map(int, input().split())
ans = b+c-a
if ans < 1:
    print(int(0))
else:
    print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
nums = [int(i) for i in input().split()]

bool = True
for i in range(n, 0, -1):
    t = nums[i] - 1
    if t < nums[i-1]:
        bool = False

if bool:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
a, b, c = [int(input()) for _ in range(3)]
ans = b+c-a
if ans < 1:
    print(0)
else:
    print(ans)

Buggy submission (verdict: Runtime Error):
a, b, c = [int(input()) for _ in range(3)]

if (b + c) - a < 1:
    print(0)
else:
    print(b+c-a)
Problem p03017 (python)

Fixed submission:
n,a,b,c,d=map(int,input().split())
s=input()
if (c<d):
	if not '##' in s[a-1:d-1]: print('Yes')
	else: print('No')
elif (d<c):
	if (not '##' in s[a-1:c-1])&('...' in s[b-2:d+1]): print('Yes')
	else: print('No')

Buggy submission (verdict: Runtime Error):
n,a,b,c,d=map(int,input().split())
s=input()
if (c<d):
	if not '##' in s[a:d]: print('Yes')
	else: print('No')
elif (d<c):
	if (not '##' in s[a:c])&(s[d+1]!='#'):print('Yes')
	else: print('No')
Problem p03127 (python)

Fixed submission:
import fractions
from functools import reduce
N = int(input())
A = input().split()
A = [int(i) for i in A]
print(reduce(fractions.gcd,A))

Buggy submission (verdict: Runtime Error):
import math
from functools import reduce
N = int(input())
A = input().split()
A = [int(i) for i in A]
print(reduce(math.gcd,A))
Problem p02627 (python)

Fixed submission:
x = input()
if x.isupper():
  print('A')
else:
  print('a')

Buggy submission (verdict: Runtime Error):
x = input()
if X.isupper():
  print('A')
else:
  print('a')
Problem p02682 (python)

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

if  a > k:
  print(k)
elif a + b >= k:
  print(a)
else:
  print(2*a - k + b)

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

if  a + b = k:
  print(a)
else:
  print(2*a - k + b)

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

lst_1 = [1] * a
lst_2 = [0] * b
lst_3 = [-1] * c
lst_1.extend(lst_2)
lst_1.extend(lst_3)

ans = sum(lst_1[0:k])
print(ans)
Problem p02693 (python)

Fixed submission:
k = int(input())
a, b = map(int,input().split())
for i in range(a, b + 1):
  if i % k == 0:
    print("OK")
    exit()

print("NG")

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

if k == 1:
  print("OK")
  exit()
else:
  for i in range(a, b):
    if i % k == 0:
      ans = "OK"
      break
    else:
      ans = "NG"
print(ans)
Problem p02881 (python)

Fixed submission:
def dis(xa,ya):
    return abs(xa - 1) + abs(ya - 1)

n = int(input())
ans = 2*n
i = 1
while i*i <= n:
    if (n % i == 0):
        ans = min(ans, dis(i,n//i))
    i += 1
print(ans)

Buggy submission (verdict: Runtime Error):
def dis(xa,ya):
  return abs(xa - 1) + abs(ya - 1)

n = int(input())
ans = 2*n
i = 1
while i*i <= n:
	if (n % i == 0):
      ans = min(ans,dis(i,n//i))
    i += 1
print(ans)
Problem p02577 (python)

Fixed submission:
s = input()
summation = sum([int(i) for i in s])
is_mul = summation%9
if is_mul == 0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
summation = sum([int(i) for i in s])
is_mul = summation%9
if is_mul == 0:
  print("Yes")
else:
  print("No")
Problem p02915 (python)

Fixed submission:
n = int(input())
print(n*n*n)

Buggy submission (verdict: Runtime Error):
N = int(input())
ls = [int(i) for i in input().split()]
if len(ls) == 1:
  print(ls[0]*2)
else:
  als = [ls[0]]
  for n in range(1, N-1):
    als.append(min(ls[n-1], ls[n]))
  als.append(ls[-1])
  print(sum(als))

Buggy submission (verdict: Runtime Error):
n = int(input)
print(n*n*n)
Problem p02695 (python)

Fixed submission:
#12653415
#わからんが、とてもきれいですね

N, M, Q = list(map(int, input().split()))
 
conditions = [list(map(int, input().split())) for _ in range(Q)]
 
def dfs(A, max_a):
    if len(A) == N:
        num = 0
        for a, b, c, d in conditions:
            if A[b-1] - A[a-1] == c:
                num += d
        return num
    ans = 0
    for i in range(max_a, M+1):
        ans = max(ans, dfs(A + [i], i))
    return ans
 
print(dfs([1], 1))

Buggy submission (verdict: Runtime Error):

import random
n, m, q = list(map(int,input().split()))

a = [0] * q
b = [0] * q
c = [0] * q
d = [0] * q
for i in range(q):
    a[i], b[i], c[i], d[i] = map(int, input().split())

A = [0]*60

    

l = [0]*60
for z in range(60):
  x = 0
  for j in range(q - 1):
    if A[z[b[j] - 1]] - A[z[a[j] - 1]] == c[j]:
      x = x + int(d[j])
    l[j] = x
    
    
x = 0
for j in range(q - 1):
  if A[b[j] - 1] - A[a[j] - 1] == c[j]:
    x = x + int(d[j])
  l[j] = x

print(max(l))
Problem p02699 (python)

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

if int(sw[0]) > int(sw[1]):
    print("safe")
else:
    print("unsafe")

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

if sw[0] > w[1]:
    print("safe")
else:
    print("unsafe")
Problem p02711 (python)

Fixed submission:
n = int(input())
n = str(n)
  
if n[len(n) - 1] == str("7"):
  print("Yes")
elif n[len(n)- 2] == str("7"):
  print("Yes")
elif n[len(n)- 3] == str("7"):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n = input().split
 
if n[len(n)] == 7:
  print("Yes")
elif n[len(n)- 1] == 7:
  print("Yes")
elif n[len(n)- 2] == 7:
  print("Yes")
else:
  print("No")

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

if len(n) = 7:
  print("Yes")
elif len(n - 1) = 7:
  print("Yes")
elif len(n - 2) = 7:
  print("Yes")
else:
  print("No")
Problem p02729 (python)

Fixed submission:
N, M = map(int, input().split())
#Nは偶数。偶数２つの場合
n = 0
for i in range(1, N):
  n = n + i
 
#Mは奇数。奇数２つの場合
m = 0
for j in range(1, M):
  m = m + j
  
print("{}".format(n + m))

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
#Nは偶数。偶数２つの場合
n = 0
for i in range(0, N):
  n = n + i - 1
 
#Mは奇数。奇数２つの場合
m = 0
for j in range(0, M):
  m = m + j - 1
 
return n + m
Problem p02759 (python)

Fixed submission:
n = int(input())
if n % 2 != 0:
  n = n + 1
  
print(n // 2)

Buggy submission (verdict: Runtime Error):
a = input()
if a % 2 == 0:
  print(a // 2)
else:
  print((a + 1) // 2)
Problem p02773 (python)

Fixed submission:
import sys 
from collections import Counter
 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
N = int(readline())
l = read().decode().split()
c = Counter(l)
 
max = c.most_common()[0][1]
ans = [i[0] for i in c.items() if i[1] >= max]
 
print('\n'.join(sorted(ans)))

Buggy submission (verdict: Runtime Error):
import pandas
 
n = int(input())
s = [input() for _ in range(n)]

x = pandas.Series(s)
lis = x.mode().tolist()
 
for i in range(len(lis)):
  print(lis[i])

Buggy submission (verdict: Runtime Error):
import pandas
 
n = int(input())
s = [input() for _ in range(n)]
 
x = pandas.Series(s)
lis = x.mode().tolist()

for i in range(len(lis)):
  print(lis[i])

Buggy submission (verdict: Runtime Error):
import pandas
 
n = int(input())
s = [input() for _ in range(n)]
 
x = pandas.Series(s)
lis = x.mode().tolist()
lis = sort(lis)
for i in range(len(lis)):
  print(lis[i])

Buggy submission (verdict: Runtime Error):
import pandas

n = int(input())
s = [input() for _ in range(n)]

x = pandas.Series(s)
lis = x.mode().tolist()
lis = sort(lis)
for i in range(len(lis)):
  print(lis[i])