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

Fixed submission:
N = int(input())

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        temp = []
        if n % i == 0:
            temp.append(i)
            temp.append(n//i)
            divisors.append(temp)

    # divisors.sort()
    return divisors

X = make_divisors(N)
ans = 10

for i in X:
    ans = min(ans, max(len(str(i[0])), len(str(i[1]))))

print(ans)

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

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        temp = []
        if n % i == 0:
            temp.append(i)
            if i != n // i:
                temp.append(n//i)
                divisors.append(temp)

    # divisors.sort()
    return divisors

X = make_divisors(N)

for i in X:
    ans = min(1000, max(len(str(i[0])), len(str(i[1]))))

print(ans)

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

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        temp = []
        if n % i == 0:
            temp.append(i)
            if i != n // i:
                temp.append(n//i)
                divisors.append(temp)

    # divisors.sort()
    return divisors

X = make_divisors(N)

for i in X:
    ans = min(10, max(len(str(i[0])), len(str(i[1]))))

print(ans)

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

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        temp = []
        if n % i == 0:
            temp.append(i)
            if i != n // i:
                temp.append(n//i)
                divisors.append(temp)

    # divisors.sort()
    return divisors

X = make_divisors(N)

for i in X:
    ans = min(11, max(len(str(i[0])), len(str(i[1]))))

print(ans)
Problem p02570 (python)

Fixed submission:
d, t, s = map(int, input().split())
if d <= t*s:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
n = int(input())
a_list = list(map(int, input().split()))
ama_a = sum(a_list)
ans = 0
mod = 10**9+7
for i in a_list:
  ans+=i**2
ans = ama_a**2-ans
ans *= (mod+1)/2
ans %= mod
print(int(ans))
Problem p02951 (python)

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

Buggy submission (verdict: Runtime Error):
a,b,c = map(int,input().split())
print(max(0,c-a+b)
Problem p03835 (python)

Fixed submission:
count=0
k,s = map(int,input().split())
for i in range(k+1):
  for j in range(k+1):
    if 0<=(s-i-j)<=k:
      count+=1
print(count)

Buggy submission (verdict: Runtime Error):
k,s = map(int,input().split())
for i in range(k):
  for j in range(k):
    if 0<=(s-k-j)<=k:
      count+=1
print(count)
Problem p02862 (python)

Fixed submission:
def cmb(n, r, p):
    if (r < 0) or (n < r):
        return 0
    r = min(r, n - r)
    return fact[n] * factinv[r] * factinv[n-r] % p

p = 10**9 + 7
N = 10**6  # N は必要分だけ用意する
fact = [1, 1]  # fact[n] = (n! mod p)
factinv = [1, 1]  # factinv[n] = ((n!)^(-1) mod p)
inv = [0, 1]  # factinv 計算用
 
for i in range(2, N+1):
    fact.append((fact[-1] * i) % p)
    inv.append((-inv[p % i] * (p // i)) % p)
    factinv.append((factinv[-1] * inv[-1]) % p)

    
x,y=map(int,input().split())
if ((x+y)%3!=0):
  print(0)
else:
  xx=(2*x-y)//3
  yy=(2*y-x)//3
  if (xx<0 or yy<0):
    print(0)
  else:
    ans=cmb(xx+yy,xx,p)
    print(ans)

Buggy submission (verdict: Runtime Error):
def cmb(n, r, p):
    if (r < 0) or (n < r):
        return 0
    r = min(r, n - r)
    return fact[n] * factinv[r] * factinv[n-r] % p

p = 10**9 + 7
N = 10**6  # N は必要分だけ用意する
fact = [1, 1]  # fact[n] = (n! mod p)
factinv = [1, 1]  # factinv[n] = ((n!)^(-1) mod p)
inv = [0, 1]  # factinv 計算用
 
for i in range(2, N+1):
    fact.append((fact[-1] * i) % p)
    inv.append((-inv[p % i] * (p // i)) % p)
    factinv.append((factinv[-1] * inv[-1]) % p)

x,y=map(int,input().split())
ans=0
x_3=x//3
y_3=y//3
kyo2=min(x_3,y_3)
xx=x-kyo2*3
yy=y-kyo2*3

#print(xx,yy,kyo2)
    
if (xx==0 and yy==0):
  ans=cmb(2*kyo2,kyo2,p)
  print(ans)
elif (xx/yy==2):
  ans=cmb(2*kyo2+yy,kyo2,p)
  print(ans)
elif (yy/xx==2):
  ans=cmb(2*kyo2+xx,kyo2,p)
  print(ans)
else:
  print(0)

Buggy submission (verdict: Runtime Error):
def cmb(n, r, p):
    if (r < 0) or (n < r):
        return 0
    r = min(r, n - r)
    return fact[n] * factinv[r] * factinv[n-r] % p

p = 10 ** 9 + 7
N = 10 ** 6  # N は必要分だけ用意する
fact = [1, 1]  # fact[n] = (n! mod p)
factinv = [1, 1]  # factinv[n] = ((n!)^(-1) mod p)
inv = [0, 1]  # factinv 計算用
 
for i in range(2, N + 1):
    fact.append((fact[-1] * i) % p)
    inv.append((-inv[p % i] * (p // i)) % p)
    factinv.append((factinv[-1] * inv[-1]) % p)

x,y=map(int,input().split())
ans=0
x_3=x//3
y_3=y//3
kyo2=min(x_3,y_3)
xx=x-kyo2*3
yy=y-kyo2*3

#print(xx,yy,kyo2)
    
if (xx==0 and yy==0):
  ans=cmb(2*kyo2,kyo2,p)
  print(ans)
elif (xx/yy==2):
  ans=cmb(2*kyo2+yy,kyo2,p)
  print(ans)
elif (yy/xx==2):
  ans=cmb(2*kyo2+xx,kyo2,p)
  print(ans)
else:
  print(0)
Problem p02879 (python)

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

Buggy submission (verdict: Runtime Error):
print(a*b if (a<10 and b<10) else -1)
Problem p03464 (python)

Fixed submission:
# 後ろから順に考える
# 最後のA_Kは必ず2である必要がある
# A_Kの前には2~3人である必要がある
# ...

K = int(input())
As = list(map(int, input().split()))
As.reverse()

fail = False
if As[0] != 2:
    fail = True
else:
    mn = 2
    mx = 3
    for a in As[1:]:
        # 今 [mn, mx] = [4, 13], a = 3だとする
        # a人組をつくったあとにありうる数は3の倍数なので、ここでは6, 9, 12のみありうる
        if mn % a != 0:
            mn = (mn // a) * a + a
        if mx % a != 0:
            mx = (mx // a) * a
        if mn > mx:
            fail = True
            break

        # mxを修正
        mx = mx + (a - 1)
if fail:
    print(-1)
else:
    print(mn, mx)

Buggy submission (verdict: Runtime Error):
# 後ろから順に考える
# 最後のA_Kは必ず2である必要がある
# A_Kの前には2~3人である必要がある
# ...

K = int(input())
As = list(map(int, input().split()))
As.reverse()

fail = False
if As[0] != 2:
    fail = True
else:
    mn = 2
    mx = 3
    for a in As[1:]:
        # 今 [mn, mx] = [4, 13], a = 3だとする
        # a人組をつくったあとにありうる数は3の倍数なので、ここでは6, 9, 12のみありうる
        if mn % a != 0:
            mn = (mn // a) * a + a
        if mx % a != 0:
            mx = (mx // a) * a
        if mn > mx:
            fail = True
            break

        # mxを修正
        mx = mx + (a - 1)
if fail:
    print(-1)
else:
Problem p02726 (python)

Fixed submission:
import numpy as np

inf = np.iinfo(np.uint32).max



# def solve():
#     dists_y = [abs(y-a) for a in range(0,n+1)]
#     dists_x = [abs(x-a) for a in range(0,n+1)]
#     count_dists = np.zeros(n+1, dtype=int)
#     for a in range(1,n+1):
#         for b in range(1,a+1):
#             dis = min(abs(b-a), dists_x[a] + dists_y[b] + 1, dists_y[a] + dists_x[b] + 1)
#             count_dists[dis] += 1
#     #print(min_dists)
#     for j in range(1,n):
#         print(count_dists[j])

def solve():
    dists_y = [abs(y-a) for a in range(1,n+1)]
    dists_x = [abs(x-a) for a in range(1,n+1)]

    aa = np.tile(np.arange(1, n+1), (n, 1))
    bb = aa.transpose().copy()
    base_dists = np.abs(aa-bb).copy()
    aa = np.tile(dists_y, (n, 1))
    bb = np.tile(dists_x, (n, 1)).transpose().copy()
    ab_dists = aa + bb + 1
    ba_dists = ab_dists.transpose().copy()
    min_dists = np.minimum(ab_dists, ba_dists)
    min_dists = np.minimum(min_dists, base_dists)
    count_dists = np.bincount(min_dists.reshape(n**2))
    for j in range(1,n):
        if j+1>len(count_dists):
            print(0)
        else:
            print(count_dists[j]//2)



#
# def ceildiv(a, b):
#     return a // b + a % b



n, x, y = [int(i) for i in input().split(" ")]

# import time
# t = time.time()
# n, x, y = 2000, 200, 600


solve()
#print(time.time()- t)

Buggy submission (verdict: Runtime Error):
import numpy as np
inf = np.iinfo(np.uint32).max



def solve():
    count_dists = np.zeros(n+1, dtype=int)
    for a in range(1,n+1):
        for b in range(1,a+1):
            dis = min(abs(b-a), abs(x-a)+ abs(y-b) + 1, abs(y-a) + abs(x-b) + 1)
            count_dists[dis] += 1
    #print(min_dists)
    for j in range(1,n):
        print(count_dists[j])


#
# def ceildiv(a, b):
#     return a // b + a % b



n, x, y = [int(i) for i in input().split(" ")]

solve()
Problem p02571 (python)

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

stri = []
mincount = 1e9
for i in range(len(s)-len(t)+1):
    count = 0
    for j in range(len(t)):
        if(s[i+j] != t[j]):
            count+= 1
    mincount = min(mincount,count) 
print(mincount)

Buggy submission (verdict: Runtime Error):
def main():
    s = input()
    t = input()
    ans = 100000000
    for i in range(0,len(s)-len(t)):
        cnt = 0
        for sub_s,sub_t in zip(s[i:len(t)+i],t):
            if sub_s != sub_t:
                cnt += 1
        if cnt < ans:
            ans = cnt
    print(cnt)
    

if __name__ == "__main__":
    main()
Problem p03077 (python)

Fixed submission:
import math
n = int(input())

A = list()
for i in range(5):
    A.append(int(input()))

min_num = min(A)

ans = math.ceil(n/min_num)+4


print(ans)

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

A = list()
for i in range(5):
    A.append(int(input()))

min_num = min(A)

ans = math.ceil(n/min_num)+4


print(ans)
Problem p02580 (python)

Fixed submission:
H, W, M = map(int,input().split())
P = [list(map(int, input().split())) for i in range(M)]
for p in P:
    p[0] -= 1
    p[1] -= 1
cnth = [0]*H
cntw = [0]*W
ans = 0
for p in P:
    cnth[p[0]] += 1
for p in P:
    cntw[p[1]] += 1
mxh = max(cnth)
mxw = max(cntw)
cntx = 0
for p in P:
    if cnth[p[0]] == mxh and cntw[p[1]] == mxw:
        cntx += 1
if cntx == cnth.count(mxh) * cntw.count(mxw):
    ans = mxh + mxw -1
else:
    ans = mxh + mxw
print(ans)

Buggy submission (verdict: Runtime Error):
H, W, M = map(int,input().split())
P = [list(map(int, input().split())) for i in range(M)]
counth = [0]*H
countw = [0]*W
ans = 0
for i in P:
    counth[i[0]-1] += 1 
for i in P:
    countw[i[1]-1] += 1 
maxh = 0
for i in counth:
    maxh = max(maxh,i)
h = counth.index(maxh)
ans += maxh
maxw = 0
for i in countw:
    maxw = max(maxw,i)
w = counth.index(maxw)
if [h+1,w+1] in P:
    ans -= 1
ans += maxw
print(ans)
Problem p02699 (python)

Fixed submission:
S, W = map(int,input().split())
if W >= S:
    print('unsafe')
else:
    print('safe')

Buggy submission (verdict: Runtime Error):
S, W = map(int,input(.split()))
if W >= S:
    print('unsafe')
else:
    print('safe')
Problem p02860 (python)

Fixed submission:
a = int(input())
b = str(input())
 
if (a%2)==1:
  print('No')
elif b[0:int(a/2)]==b[int(a/2):]:
    print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
a = int(input())
b = str(input())
 
if (a/2)%2==1:
  print('No')
elif: b[0:int(a/2)]==b[int(a/2):]:
    print('Yes')
else:
  print('No')

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

if (a/2)%2==1:
  print('No')
elif:
  if b[0:int(a/2)]==b[int(a/2):]:
    print('Yes')
  else:
    print('No')
Problem p02594 (python)

Fixed submission:
x=int(input())
if x>=30:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n,d=map(int,input().split())
cnt=0
for i in range(n):
  x,y=map(int,input().split())
  if x*x+y*y<=d*d:
    cnt+=1
  else:
    continue
print(cnt)

Buggy submission (verdict: Runtime Error):
n,d=map(int,input().split())
cnt=0
for i in range(n):
  x,y=map(int,input().split())
  if x*x+y+y<=d*d:
    cnt+=1
  else:
    continue
print(cnt)

Buggy submission (verdict: Runtime Error):
n,d=map(int,input().split())
cnt=0
for i in range(n):
  x,y=map(int,input().split())
  if x*x+y+y<=d*2:
    cnt+=1
  else:
    continue
print(cnt)
Problem p02659 (python)

Fixed submission:
a,b=map(str,input().split())
import math
a=int(a)
B=int(b[0]+b[2]+b[3])
print(int(a*B//100))

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
print(int(a*b))
Problem p02723 (python)

Fixed submission:
s=list(input())
if s[2]==s[3] and s[4]==s[5]:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
s=list[input()]
if s[2]==s[3] and s[4]==s[5]:
  print("Yes")
else:
  print("No")
Problem p02753 (python)

Fixed submission:
a=list(input())
if a[0]==a[1]==a[2]:
  print("No")
else:
  print("Yes")

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

Buggy submission (verdict: Runtime Error):
s=list(input())
if s="AAA" or "BBB":
  print("No")
else:
  print("Yes")
Problem p02915 (python)

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

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 = sum(B)
for i in range(len(A)-1):
    if A[i] + 1 == A[i+1]:
        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()))
d=sum(B)
for i in range(n-1):
  if A[i+1]-A[i]==1:
    d+=C[A[i]-1]
print(d)

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()))
d=sum(B)
for i in range(n-1):
  if A[i+1]-A[i]==1:
    d+=B[A[i]-1]
print(d)
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()))
d=sum(B)
for i in range(n-1):
  if A[i+1]-A[i]==1:
    d+=C[A[i]-1]
print(d)

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()))
d=sum(B)
for i in range(n-1):
  if A[i+1]-A[i]==1:
    d+=B[A[i-1]]
print(d)
Problem p02933 (python)

Fixed submission:
a=int(input())
s=input()
if a>=3200:
  print(s)
else:
  print('red')

Buggy submission (verdict: Runtime Error):
n=int(input())
A=list(map(int,input().split()))
s=0
for i in range(n):
  s+=1/A[i]
print(1/s)
Problem p03036 (python)

Fixed submission:
r,d,x=map(int,input().split())

for i in range(1,11):
  x=r*x-d
  print(x)

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

for i inrange(1,11):
  x=r*x-d
  print(x)
Problem p03041 (python)

Fixed submission:
n,k=map(int,input().split())
s=list(input())
s[k-1]=s[k-1].lower()
print(''.join(s))

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
s=str(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()))
ans=0
m=-1000
for i in range(n):
  if m<=H[i]:
    m=H[i]
    ans+=1
print(ans)

Buggy submission (verdict: Runtime Error):
n=int(input())
H=list(map(int,input()))
ans=0
m=-1000
for i in range(n):
  if m<=H[i]:
    m=H[i]
    ans+=1
print(ans)
Problem p03207 (python)

Fixed submission:
n=int(input())
a=[]
for i in range(n):
  p=int(input())
  a.append(p)

a.sort()
s=a[n-1]//2
print(sum(a)-s)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=[]
for i in range(n):
  p=int(input())
  a.append(p)

a.sort()
s=p[n-1]//2
print(sum(a)-s)
Problem p03242 (python)

Fixed submission:
a=input()
print(a.replace("1","x").replace("9","1").replace("x","9"))

Buggy submission (verdict: Runtime Error):
n = int(input())
alist  = list(map(int,input().split()))
list1 = alist[1::2]
list2 = alist[0::2]
from collections import Counter
dic1 = Counter(list1).most_common()
dic2 = Counter(list2).most_common()

if dic1[0][0]!=dic2[0][0]:
  print(n - dic1[0][1] - dic2[0][1]+1)
else:
  print(min(n - dic1[0][1] - dic2[1][1]+1, n -dic1[1][1] - dic2[0][1]+1))

Buggy submission (verdict: Runtime Error):
a=input()
print(a,replace("1","x").replace("9","1").replace("x","9"))
Problem p02712 (python)

Fixed submission:
n = int(input())

total = 0

for i in range(n):
  if (i+1)%3 != 0 and (i+1)%5 != 0:
    total += i+1
    
print(total)

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

total = 0

for i in range(n):
  if (i+1)%3 != 0 and (i+!)%5 != 0:
    total += i+1
    
print(total)
Problem p02572 (python)

Fixed submission:
N = int(input())
a = list(map(int,input().split()))
a_s = sum(a)
mod = 10**9+7
s = 0
for i in range(N-1):
    b = a[i]
    a_s -= b
    s += b*(a_s)
    s %= mod
print(s)

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(map(int,input().split()))
s = 0
for i in range(N):
    s += sum(a[i]*a[i+1:])
print(s%(pow(10,9)+7))

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(map(int,input().split()))
s = 0
for i in range(N):
    b = a[i]
    s += sum(b*a[i+1:])
print(s%(pow(10,9)+7))
Problem p02570 (python)

Fixed submission:
D,T,S = [int(i) for i in input().split(' ')]
 
if T*S >= D:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
N = input()
a_list = [int(i) for i in input().split(' ')]
mod = 1000000007
 
sum = 0
for i in a_list:
  sum += i
 
output_sum = 0
for idx, i in enumerate(a_list[:-1]):
  sum -= a_list[idx]
  output_sum += i*sum
  
print(output_sum%mod)

Buggy submission (verdict: Runtime Error):
N = input()
a_list = [int(i) for i in input().split(' ')]
mod = 1000000007
 
sum = 0
for i in a_list:
  sum += i
output_sum=0
for idx, i in enumerate(a_list[:-1]):
  sum -= a_list[idx]
  output_sum += i*sum
  
print(output_sum%mod)

Buggy submission (verdict: Runtime Error):
N = input()
a_list = [int(i) for i in input().split(' ')]
mod = 1000000007
 
sum = 0
for i in a_list:
  sum += i

output_sum = 0
for idx, i in enumerate(a_list[:-1]):
  sum -= a_list[idx]
  output_sum += i*sum
  
print(output_sum%mod)

Buggy submission (verdict: Runtime Error):
N = input()
a_list = [int(i) for i in input().split(' ')]
mod = 1000000007
 
sum = 0
for i in a_list:
  sum += i
 
for idx, i in enumerate(a_list[:-1]):
  sum -= a_list[idx]
  sum += i*sum
  
print(sum%mod)

Buggy submission (verdict: Runtime Error):
S = input()
T = input()

min = len(T)
for t in range(len(S) - len(T)+1):
    tmp = 0
    for i in range(len(T)):
        if S[i+t] != T[i]:
            tmp+=1
    
    if tmp < min:
        min = tmp

print(min)

Buggy submission (verdict: Runtime Error):
if S*T > D:
  print('Yes')
else:
  print('No')
Problem p03135 (python)

Fixed submission:
T,X=input().split()
print(int(T)/int(X))

Buggy submission (verdict: Runtime Error):
N=int(input())
l_list = list(map(int,input().split()))
max_l=max(l_list)
if sum(l_list)-max_l>max_l:
  print("Yes")
else:
  print("No")
Problem p02659 (python)

Fixed submission:
a,b = input().split()
a1 = int(a)
bs = list(b)
b1 = int(bs[0])
b2 = 0
if len(b)==3:
    b2 = int(bs[2])*10
else:
    b2 = int(bs[2]+bs[3])
b1 = b1*100+b2
ans = list(str(a1*b1))
del ans[-1]
if ans:
    del ans[-1]
if ans:
    print(''.join(ans))
else:
    print(0)

Buggy submission (verdict: Runtime Error):
a,b = input().split()
a1 = int(a)
bs = list(b)
b1 = int(bs[0])
b2 = 0
if len(b)==3:
    b2 = int(bs[2])*10
else:
    b2 = int(bs[2]+bs[3])
b1 = b1*100+b2
ans = list(str(a1*b1))
del ans[-1]
del ans[-1]
print(''.join(ans))
Problem p02682 (python)

Fixed submission:
a,b,c,k = [int(i) for i in input().split()]
if k<=a:
  print(k)
elif k<=a+b and k>a:
  print(a)
else:
  print(a-(k-a-b))

Buggy submission (verdict: Runtime Error):
a,b,c,k = [int(i) for i in input().split()]
if k<=a:
  print(k)
else if k<=a+b and k>a:
  print(a)
else:
  print(a-(k-a-b))

Buggy submission (verdict: Runtime Error):
a,b,c,k = [int(i) for i in input().split()]
if k<=a:
  print(k)
else if a<k<=a+b:
  print(a)
else:
  print(a-(k-a-b))
Problem p02711 (python)

Fixed submission:
n = list(input())
ans = 'No'
for i in range(len(n)):
  if n[i] == '7':
    ans = 'Yes'
    break
print(ans)

Buggy submission (verdict: Runtime Error):
n = list(input())
ans = 'No'
for i in range(len(n)):
  if n[i] = '7':
    ans = 'Yes'
    break
print(ans)

Buggy submission (verdict: Runtime Error):
n = input()
ans = 'No'
for i in range(len(n)):
  if n[i] = '7':
    ans = 'Yes'
    break
print(ans)
Problem p02777 (python)

Fixed submission:
s,t = input().split()
a,b = map(int,input().split())
u = input()
if u==s:
  a=a-1
else:
  b=b-1
print(a,b)

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

Buggy submission (verdict: Runtime Error):
s,t = map(int,input().split())
a,b = map(int,input().split())
u = int(input())
if u==s:
  a=a-1
else:
  b=b-1
print(a,b)
Problem p02859 (python)

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

Buggy submission (verdict: Runtime Error):
r = input()
print(r * r)

Buggy submission (verdict: Runtime Error):
r = input()
print(r * r)
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 and b < 10:
  print(a * b)
else:
  print(-1)

Buggy submission (verdict: Runtime Error):
i = input().split()
if i < 10:
  print(i[0] * i[1])
Problem p02570 (python)

Fixed submission:
D,T,S=map(int,input().split())
if (D/S)>T:
	print("No")
else:
	print("Yes")

Buggy submission (verdict: Runtime Error):
S=input()
T=input()
ans=[]
count=0
for i1 in range(len(S)-len(T)):
	for i2 in range(len(T)):
  		if S[i1+i2]==T[i2]:
          count++
    else:
    ans=ans.append(count)
    count=0
else:
	print(ans.max())

Buggy submission (verdict: Runtime Error):
D,T,S=map(int,input())
if D*S>T:
	print("No")
else:
	print("Yes")

Buggy submission (verdict: Runtime Error):
D,T,S=map(int,input())
if D*S>T :
	print("No")
else:
	print("Yes")

Buggy submission (verdict: Runtime Error):
D,T,S=map(int,input())
if D*S>T :
 print("No")
else:
 print("Yes")
Problem p02831 (python)

Fixed submission:
import fractions
a,b = map(int,input().split())
ans = a * b // fractions.gcd(a, b)
print(ans)

Buggy submission (verdict: Runtime Error):
import math
a,b = map(int,input().split())
ans = a * b // math.gcd(a, b)
print(ans)
Problem p02580 (python)

Fixed submission:
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

h,w,m = map(int,input().split())
yoko = [0] * h
tate = [0] * w
S = set()
for _ in range(m):
  i,j = map(int,input().split())
  i-=1
  j-=1
  yoko[i] += 1
  tate[j] += 1
  S.add((i,j))
MY = max(yoko)
MT = max(tate)
max_yokos = []
max_tates = []
for i in range(h):
  if yoko[i] == MY:
    max_yokos.append(i)
for j in range(w):
  if tate[j] == MT:
    max_tates.append(j)
lmy = len(max_yokos)
lmt = len(max_tates)
for i in max_yokos:
  for j in max_tates:
    if not (i,j) in S:
      print(MY + MT)
      exit()
print(MY + MT - 1)


# print(tate)
# print(yoko)

Buggy submission (verdict: Runtime Error):
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

h,w,m = map(int,input().split())
grid = [[0] * w for i in range(h)]
# print(*grid,sep= "\n")
for _ in range(m):
  i,j = map(int,input().split())
  i-=1
  j-=1
  grid[i][j] += 1
tate = [0] * w
yoko = [0] * h
for i in range(h):
  yoko[i] = sum(grid[i])
for j in range(w):
  tmp = 0
  for i in range(h):
    tmp += grid[i][j]
  tate[j] = tmp
for i in range(h):
  for j in range(w):
    ans = max(ans,yoko[i] + tate[j]-grid[i][j])
print(ans)
# print(tate)
# print(yoko)