Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline

n = int(input())
a = [int(input()) for _ in range(n)]
ans=max(a)
for i in range(n):
    print(ans if a[i]!=ans else sorted(a)[-2])

Fixed submission:
import sys
input = sys.stdin.readline

n = int(input())
a = [int(input()) for _ in range(n)]
ans=max(a)
if a.count(ans)>1:
    for _ in range(n):
        print(ans)
else:
    for i in range(n):
        print(ans if a[i]!=ans else sorted(a)[-2])

Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque
n=int(input())
a=[int(input()) for _ in range(n)]
ans=max(a)
for i in range(n):
    print(ans if a[i]!=ans else sorted(a)[-2])

Fixed submission:
import sys
input = sys.stdin.readline

n = int(input())
a = [int(input()) for _ in range(n)]
ans=max(a)
if a.count(ans)>1:
    for _ in range(n):
        print(ans)
else:
    for i in range(n):
        print(ans if a[i]!=ans else sorted(a)[-2])

Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque
n=int(input())
a=deque([int(input()) for _ in range(n)])
for _ in range(n):
    ans=a
    x=ans.popleft()
    print(max(ans))
    ans.append(x)

Fixed submission:
import sys
input = sys.stdin.readline

n = int(input())
a = [int(input()) for _ in range(n)]
ans=max(a)
if a.count(ans)>1:
    for _ in range(n):
        print(ans)
else:
    for i in range(n):
        print(ans if a[i]!=ans else sorted(a)[-2])

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=[int(input()) for _ in range(n)]
for _ in range(n):
    ans=a
    x=ans.pop(0)
    print(max(ans))
    ans.append(x)

Fixed submission:
import sys
input = sys.stdin.readline

n = int(input())
a = [int(input()) for _ in range(n)]
ans=max(a)
if a.count(ans)>1:
    for _ in range(n):
        print(ans)
else:
    for i in range(n):
        print(ans if a[i]!=ans else sorted(a)[-2])
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
A=list(set(a))
ans="Yes"
if len(A)!=3 or A==[0]:
    ans="No"
    if a.count(A[0])==2*a.count(A[1]) or 2*a.count(A[0])==a.count(A[1]):
        ans="Yes"
print(ans)

Fixed submission:
n=int(input())
L=list(map(int,input().split()))
LL=list(set(L))
ans="No"
if LL==[0]:
    ans="Yes"
elif len(LL)==2:
    if L.count(LL[0])==2*L.count(LL[1]) or L.count(LL[1])==2*L.count(LL[0]):
        ans="Yes"
elif len(LL)==3:
    if L.count(LL[0])==L.count(LL[1]) and L.count(LL[1])==L.count(LL[2]):
        if LL[0]^LL[1]^LL[2]==0:
            ans="Yes"
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=sorted(list(map(int,input().split())))
ans="Yes"
if n>3:
    for i in range(n-1):
        if a.count(a[i])!=a.count(a[i+1]) or a.count(a[i])==1:
            ans="No"
            break
print(ans)

Fixed submission:
n=int(input())
L=list(map(int,input().split()))
LL=list(set(L))
ans="No"
if LL==[0]:
    ans="Yes"
elif len(LL)==2:
    if L.count(LL[0])==2*L.count(LL[1]) or L.count(LL[1])==2*L.count(LL[0]):
        ans="Yes"
elif len(LL)==3:
    if L.count(LL[0])==L.count(LL[1]) and L.count(LL[1])==L.count(LL[2]):
        if LL[0]^LL[1]^LL[2]==0:
            ans="Yes"
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=sorted(list(map(int,input().split())))
ans=[]
for i in range(n):
    for j in range(n):
        if i<j:
            c=a[i]^a[j]
            if a.count(c)>0:
                ans.append(c)
            else:break
ans=sorted(ans)
print("Yes" if ans==a else "No")

Fixed submission:
n=int(input())
L=list(map(int,input().split()))
LL=list(set(L))
ans="No"
if LL==[0]:
    ans="Yes"
elif len(LL)==2:
    if L.count(LL[0])==2*L.count(LL[1]) or L.count(LL[1])==2*L.count(LL[0]):
        ans="Yes"
elif len(LL)==3:
    if L.count(LL[0])==L.count(LL[1]) and L.count(LL[1])==L.count(LL[2]):
        if LL[0]^LL[1]^LL[2]==0:
            ans="Yes"
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=sorted(list(map(int,input().split())))
ans=[]
for i in range(n):
    for j in range(n):
        if i<j:
            c=a[i]^a[j]
            if a.count(c)>0:
                ans.append(c)
            else:break
ans=sorted(ans)
print("Yes" if ans==a else "No")

Fixed submission:
n=int(input())
L=list(map(int,input().split()))
LL=list(set(L))
ans="No"
if LL==[0]:
    ans="Yes"
elif len(LL)==2:
    if L.count(LL[0])==2*L.count(LL[1]) or L.count(LL[1])==2*L.count(LL[0]):
        ans="Yes"
elif len(LL)==3:
    if L.count(LL[0])==L.count(LL[1]) and L.count(LL[1])==L.count(LL[2]):
        if LL[0]^LL[1]^LL[2]==0:
            ans="Yes"
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
l,r=map(int,input().split())
L=[]
ans=2019
mod=0
for i in range(r-l+1):
    L.append(l+i)
for i in range(len(L)):
    for j in range(len(L)):
        if i!=j:
            mod=L[i]*L[j]%2019
            ans=min(ans,mod)
    if ans==0:
        break
print(ans)

Fixed submission:
l,r=map(int,input().split())
L=[]
ans=2019
mod=0
for i in range(r-l+1):
    L.append((l+i)%2019)
    if L.count((l+i)%2019)>1:
            break
for i in range(len(L)):
    for j in range(len(L)):
        if i!=j:
            mod=L[i]*L[j]%2019
            ans=min(ans,mod)
    if ans==0:
        break
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
r,g,b,n=map(int,input().split())
L=[r,g,b]
L.sort(reverse=True)
cnt=0
for i in range(n//L[0]+1):
    for j in range(n//L[1]+1):
        if (n-i*L[0]-j*L[1])%L[2]==0 and n-i*L[0]-j*L[1]>=0:
            cnt+=1
print(cnt)

Fixed submission:
r,g,b,n=map(int,input().split())
cnt=0
for i in range(n//r+1):
    for j in range(n//g+1):
        if (n-i*r-j*g)%b==0 and n-i*r-j*g>=0:
            cnt+=1
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
r,g,b,n=map(int,input().split())
cnt=0
for i in range(n//r+1):
    for j in range(n//g+1):
        if (n-i*r-j*g)%b==0 and n-i*r-j*g>=0:
            cnt+=1
print(cnt)

Fixed submission:
r,g,b,n=map(int,input().split())
cnt=0
for i in range(n//r+1):
    for j in range(n//g+1):
        if (n-i*r-j*g)%b==0 and n-i*r-j*g>=0:
            cnt+=1
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
r,g,b,n=map(int,input().split())
cnt=0
for i in range(n+1):
    for j in range(n+1):
        if (n-i*r-j*g)%b==0 and n-i*r-j*g>=0:
            cnt+=1
print(cnt)

Fixed submission:
r,g,b,n=map(int,input().split())
cnt=0
for i in range(n//r+1):
    for j in range(n//g+1):
        if (n-i*r-j*g)%b==0 and n-i*r-j*g>=0:
            cnt+=1
print(cnt)
Buggy python submission (verdict: Runtime Error):
t=[int(input()) for _ in range(5)]
s=[]
for i in range(5):
    s.append(t[i]%10)
    t[i]=-(-t[i]//10)*10
S=sorted(s)[-5+s.count(0)]
if S==0:
    print(sum(t))
else:print(sum(t-10+S))

Fixed submission:
t=[int(input()) for _ in range(5)]
s=[]
for i in range(5):
    s.append(t[i]%10)
    t[i]=-(-t[i]//10)*10
S=sorted(s)[-5+s.count(0)]
if S==0:
    print(sum(t))
else:print(sum(t)-10+S)
Buggy python submission (verdict: Runtime Error):
n,q=map(int,input().split())
s=input()
ans_l=[0]*8
for i in range(n-1):
    tmp=s[i]+s[i+1]
    if tmp=='AC':
        ans_l[i+1]=ans_l[i]+1
    else:
        ans_l[i+1]=ans_l[i]
for i in range(q):
    l,r=map(int,input().split())
    print(ans_l[r-1]-ans_l[l-1])

Fixed submission:
n,q=map(int,input().split())
s=input()
ans_l=[0]*n
for i in range(n-1):
    tmp=s[i]+s[i+1]
    if tmp=='AC':
        ans_l[i+1]=ans_l[i]+1
    else:
        ans_l[i+1]=ans_l[i]
for i in range(q):
    l,r=map(int,input().split())
    print(ans_l[r-1]-ans_l[l-1])
Buggy python submission (verdict: Runtime Error):
n=int(input())
tmp=2
ans=0
Flag=True
while Flag:
    tmp+=1
    iterator=product(range(3),repeat=tmp)
    for idxs in iterator:
        num=''.join(map(str,idxs))
        num753=str(num).replace('0', '3').replace('1', '5').replace('2', '7')
        if '7' in num753 and '5' in num753 and '3' in num753:
            if int(num753)<=n:
                ans+=1
            else:
                Flag=False
                break
print(ans)

Fixed submission:
from itertools import product
n=int(input())
tmp=2
ans=0
Flag=True
while Flag:
    tmp+=1
    iterator=product(range(3),repeat=tmp)
    for idxs in iterator:
        num=''.join(map(str,idxs))
        num753=str(num).replace('0', '3').replace('1', '5').replace('2', '7')
        if '7' in num753 and '5' in num753 and '3' in num753:
            if int(num753)<=n:
                ans+=1
            else:
                Flag=False
                break
print(ans)
Buggy python submission (verdict: Runtime Error):
n=int(input())
xyh=[list(map(int,input().split())) for _ in range(n)]
xyh=sorted(xyh, key=lambda x:x[2], reverse=True)

for xi in range(101):
    for yi in range(101):
        hi=0
        flag=True
        for i in range(n):
            x=xyh[i][0]
            y=xyh[i][1]
            h=xyh[i][2]
            if i==0:
                hi=abs(xi-x)+abs(yi-y)+h
            if max(hi-abs(xi-x)-abs(yi-y),0)!=h:
                flag=False
        if flag:
            print(xi, yi, hi)
            break
    else:
        continue
    break

Fixed submission:
n=int(input())
if n==1:
  print("Hello World")
else:
  a,b=[int(input()) for i in range(2)]
  print(a+b)

Buggy python submission (verdict: Runtime Error):
N,T=map(int,input().split())
cost=1000
for _ in range(N):
    c,t=map(int,input().split())
    if t<=T:
        if cost>=c:
            cost=c
if cost<=1000:
    print(cost)
else:print("TLE")

Fixed submission:
n=int(input())
if n==1:
  print("Hello World")
else:
  a,b=[int(input()) for i in range(2)]
  print(a+b)

Buggy python submission (verdict: Runtime Error):
N,T=map(int,input().split())
cost=1000
for _ in range(N):
    c,t=map(int,input().split())
    if t<=T:
        if cost>c:
            cost=c
if cost>1000:
    print(cost)
else:print("TLE")

Fixed submission:
n=int(input())
if n==1:
  print("Hello World")
else:
  a,b=[int(input()) for i in range(2)]
  print(a+b)

Buggy python submission (verdict: Runtime Error):
n=int(input())
if n==1:
  print("Hello World")
else:
  a,b=[int(input()), for i in range(2)]
  print(a+b)
  

Fixed submission:
n=int(input())
if n==1:
  print("Hello World")
else:
  a,b=[int(input()) for i in range(2)]
  print(a+b)
Buggy python submission (verdict: Runtime Error):
s=input()
ans="AC"
cnt1=0
cnt2=0
cnt3=0
for i in range(len(s)):
    if i==0:
        if s[i]!="A":
            ans="WA"
    if i==1:
        cnt1+=s[i].isupper()*1
    if i>=2:
        if i==len(s)-1:
            if s[i]=="C":
                ans="WA"
        elif s[i]=="C":
            cnt2+=1
        else:
            cnt3+=s[i].isupper()*1
if cnt1!=0 or cnt2!=1 or cnt!=0:
    ans="WA"
print(ans)

Fixed submission:
s=input()
ans="AC"
cnt1=0
cnt2=0
cnt3=0
for i in range(len(s)):
    if i==0:
        if s[i]!="A":
            ans="WA"
    if i==1:
        cnt1+=s[i].isupper()*1
    if i>=2:
        if i==len(s)-1:
            if s[i]=="C":
                ans="WA"
            elif s[i].isupper()*1>0:
                ans="WA"
        elif s[i]=="C":
            cnt2+=1
        else:
            cnt3+=s[i].isupper()*1
if cnt1!=0 or cnt2!=1 or cnt3!=0:
    ans="WA"
print(ans)
Buggy python submission (verdict: Runtime Error):
x=input()
if x%2==0:
  print(x)
else:print(x*2)

Fixed submission:
x=int(input())
if x%2==0:
  print(x)
else:print(x*2)
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
print(max(a+b,a-b,a*b)

Fixed submission:
a,b=map(int,input().split())
print(max(a+b,a-b,a*b))
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
s=[0]
ans=0
for i in range(n):
    S=s[i]+a[i]
    s.append(S)
tmp=list(set(s))
for i in range(len(tmp)):
    C=s.count(tmp[i])
    ans+=C*(C-1)//2
print(ans)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
s=[0]
ans=0
for i in range(n):
    S=s[i]+a[i]
    s.append(S)
s.sort()
cnt=1
for i in range(n):
    if s[i]==s[i+1]:
        cnt+=1
    else:
        ans+=cnt*(cnt-1)//2
        cnt=1
ans+=cnt*(cnt-1)//2
print(ans)
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a%2!=0 and b%!=0:
  print("Odd")
else:print("Even")

Fixed submission:
a,b=map(int,input().split())
if a%2!=0 and b%2!=0:
  print("Odd")
else:print("Even")
Buggy python submission (verdict: Runtime Error):
x=input()
x[3]=8
print(x)

Fixed submission:
print("2018/01/"+input()[-2:])
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
s=input()
ans="Yes"
if s.count("-")!=1:
    ans="No"
else:front,back=s.split("-")
if len(front)!=a or len(back)!=b:
    ans="No"
print(ans)

Fixed submission:
a,b=map(int,input().split())
s=input()
ans="Yes"
front=""
back=""
if s.count("-")!=1:
    ans="No"
else:front,back=s.split("-")
if len(front)!=a or len(back)!=b:
    ans="No"
print(ans)
Buggy python submission (verdict: Runtime Error):
A=input()
B=input()
if A[0]=B[2] and A[1]=B[1] and A[2]=B[0]:
  print("YES")
else:print("NO")

Fixed submission:
A=input()
B=input()
if A[0]==B[2] and A[1]==B[1] and A[2]==B[0]:
  print("YES")
else:print("NO")
Buggy python submission (verdict: Runtime Error):
r,g=[int(input()) for i range(2)]
print(g*2-r)

Fixed submission:
r,g=[int(input()) for i in range(2)]
print(g*2-r)
Buggy python submission (verdict: Runtime Error):
s=list(input())
t=list(input())
ans=[0 for _ in range(len(s))]
for i in range(len(s)-len(t)+1):
    cnt=0
    for j in range(len(t)):
        if s[i+j]=='?' or s[i+j]==t[j]:
            cnt+=1
    if cnt==len(t):
        ans[i]=i
mark=ans.index(max(ans))
if sum(ans)!=0:
    for j in range(len(s)):
        if mark<=j and j<=mark+len(t):
            s[j]=t[j-mark]
        elif s[j]=='?':
            s[j]='a'
    print(''.join(s))
else:print("UNRESTORABLE")

Fixed submission:
s=list(input())
t=list(input())
ans=[0 for _ in range(len(s))]
for i in range(len(s)-len(t)+1):
    cnt=0
    for j in range(len(t)):
        if s[i+j]=='?' or s[i+j]==t[j]:
            cnt+=1
    if cnt==len(t):
        ans[i]=i+1
mark=ans.index(max(ans))
if sum(ans)!=0:
    for j in range(len(s)):
        if mark<=j and j<mark+len(t):
            s[j]=t[j-mark]
        elif s[j]=='?':
            s[j]='a'
    print(''.join(s))
else:print("UNRESTORABLE")
Buggy python submission (verdict: Runtime Error):
n=int(input())
dp=input().split()
m=int(input())
tp=input().split()
d=dict()

ans="YES"

for di in dp:
    if di in d:
        d[di]+=1
    else:
        d[di]=1

for ti in tp:
    if ti not in dp or d[ti]==0:
        ans="NO"
        break
    else:
        d[ti]-=1
print(ans)

Fixed submission:
x=input()
print(x[:-8])
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
dp=input().split()
m=int(input())
tp=input().split()
d=dict()

ans="YES"

for di in dp:
    if di in d:
        d[di]+=1
    else:
        d[di]=1

for ti in tp:
    if ti not in dp or d[ti]==0:
        ans="NO"
        break
    else:
        d[ti]-=1
print(ans)

Fixed submission:
import collections
n=int(input())
dp=collections.Counter(int(x) for x in input().split())
m=int(input())
tp=collections.Counter(int(x) for x in input().split())
ans="YES"
for k,v in tp.items():
    if dp[k]<v:
        ans="NO"
        break
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
dp=input().split()
m=int(input())
tp=input().split()
d=dict()

ans="YES"

for di in dp:
    if di in d:
        d[di]+=1
    else:
        d[di]=1

for ti in tp:
    if ti not in dp or d[ti]==0:
        ans="NO"
        break
    else:
        d[ti]-=1
print(ans)

Fixed submission:
import collections
n=int(input())
dp=collections.Counter(int(x) for x in input().split())
m=int(input())
tp=collections.Counter(int(x) for x in input().split())
ans="YES"
for k,v in tp.items():
    if dp[k]<v:
        ans="NO"
        break
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
dp=list(map(int,input().split()))
m=int(input())
tp=list(map(int,input().split()))
d=dict()

ans="YES"

for di in dp:
    if di in d:
        d[di]+=1
    else:
        d[di]=1

for ti in tp:
    if ti not in dp or d[ti]==0:
        ans="NO"
        break
    else:
        d[ti]-=1
print(ans)

Fixed submission:
import collections
n=int(input())
dp=collections.Counter(int(x) for x in input().split())
m=int(input())
tp=collections.Counter(int(x) for x in input().split())
ans="YES"
for k,v in tp.items():
    if dp[k]<v:
        ans="NO"
        break
print(ans)

Buggy python submission (verdict: Runtime Error):
n=int(input())
dp=list(map(int,input().split()))
m=int(input())
tp=list(map(int,input().split()))
d=dict()

ans="YES"

for di in dp:
    if di in d:
        d[di]+=1
    else:
        d[di]=1

for ti in tp:
    if d[ti]==0:
        ans="NO"
        break
    else:
        d[ti]-=1
print(ans)

Fixed submission:
import collections
n=int(input())
dp=collections.Counter(int(x) for x in input().split())
m=int(input())
tp=collections.Counter(int(x) for x in input().split())
ans="YES"
for k,v in tp.items():
    if dp[k]<v:
        ans="NO"
        break
print(ans)

Buggy python submission (verdict: Runtime Error):
n=int(input())
dp=list(map(int,input().split()))
m=int(input())
tp=list(map(int,input().split()))
d=dict()

ans="YES"

for di in dp:
    if di in d:
        d[di]+=1
    else:
        d[di]=1

for ti in tp:
    if d[ti]==0:
        ans="No"
        break
    else:
        d[ti]-=1
print(ans)

Fixed submission:
import collections
n=int(input())
dp=collections.Counter(int(x) for x in input().split())
m=int(input())
tp=collections.Counter(int(x) for x in input().split())
ans="YES"
for k,v in tp.items():
    if dp[k]<v:
        ans="NO"
        break
print(ans)
Buggy python submission (verdict: Runtime Error):
x,a,b=map(int,input().split())
if abs(x-a)<abs(x-b):
  print("A")
else print("B")

Fixed submission:
x,a,b=map(int,input().split())
if abs(x-a)<abs(x-b):
  print("A")
else:print("B")
Buggy python submission (verdict: Runtime Error):
import math
def lcm(x, y):
    return (x * y) // math.gcd(x, y)
n=int(input())
ans=1
tmp1=int(input())
for i in range(n-1):
    tmp2=int(input())
    ans=lcm(tmp1,tmp2)
    tmp1=ans
print(ans)

Fixed submission:
def gcd(x, y):
    if y == 0:
        return x
    else:
        return gcd(y, x%y)
def lcm(x, y):
    return (x * y) // gcd(x, y)
n=int(input())
tmp1=int(input())
ans=tmp1
for i in range(n-1):
    tmp2=int(input())
    ans=lcm(tmp1,tmp2)
    tmp1=ans
print(ans)
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a+b < 24:
print(a+b)
else : print(24-a-b)

Fixed submission:
a,b=map(int,input().split())
if a+b < 24:print(a+b)
else : print(abs(24-a-b))
Buggy python submission (verdict: Runtime Error):
import math
N=int(input())
print(math.factorial(N)%(10**9+7)

Fixed submission:
import math
N=int(input())
print(math.factorial(N)%(10**9+7))
Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
i1=[input() for _ in range(n)]
i2=[input() for _ in range(m)]
ans="No"
for i in range(n-m+1):
    for j in range(n-m+1):
        if i1[i][j:m+j]==i2[0] and i1[i+1][j:j+m]==i2[1]:
            ans="Yes"
print(ans)

Fixed submission:
a,b=map(int, input().split())
if a==b:
  print("Draw")
elif a==1 or (a>b and b!=1):
  print("Alice")
else:
  print("Bob")
Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
i1=[input() for _ in range(n)]
i2=[input() for _ in range(m)]
ans="No"
for i in range(n-m+1):
    for j in range(n-m+1):
        if i1[i][j:m+j]==i2[0] and i1[i+1][j:j+m]==i2[1]:
            ans="Yes"
print(ans)

Fixed submission:
n,m=map(int,input().split())
i1=[input() for _ in range(n)]
i2=[input() for _ in range(m)]
ans="No"
for i in range(n-m+1):
    for j in range(n-m+1):
        count=0
        for k in range(m):
            if i1[i+k][j:m+j]==i2[k]:
                count+=1
                if count==m:
                    ans="Yes"
print(ans)

Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
i1=[input() for _ in range(n)]
i2=[input() for _ in range(m)]
ans="No"
for i in range(n-m+1):
    for j in range(n-m+1):
        if i1[i][j:m+j]==i2[0] and i1[i+1][j:j+m]==i2[1]:
            ans="Yes"
print(ans)

Fixed submission:
n,m=map(int,input().split())
i1=[input() for _ in range(n)]
i2=[input() for _ in range(m)]
ans="No"
for i in range(n-m+1):
    for j in range(n-m+1):
        count=0
        for k in range(m):
            if i1[i+k][j:m+j]==i2[k]:
                count+=1
                if count==m:
                    ans="Yes"
print(ans)
Buggy python submission (verdict: Runtime Error):
A,B,C,D=map(int,input().split())
print(map(A*B,C*D))

Fixed submission:
A,B,C,D=map(int,input().split())
print(max(A*B,C*D))
Buggy python submission (verdict: Time Limit Exceeded):
count=0
z=0
k,s=map(int,input().split())
for i in range(k+1):
    for j in range(k+1):
        x=i
        y=j
        z=-i-j+s
        if k>=z>=0:
            count+=1
print(count)

Fixed submission:
count=0
z=0
k,s=map(int,input().split())
for i in range(k+1):
    for j in range(k+1):
        x=i
        y=j
        z=-i-j+s
        if k>=z>=0:
            count+=1
print(count)
Buggy python submission (verdict: Runtime Error):
h,w=map(int,input().split())
s=[input().split() for _ in range(w)]
for i in range(w):
    for j in range(h):
        if s[i][j]=="snuke":
            print(chr(ord("A")+j)+str(i+1))

Fixed submission:
h,w=map(int,input().split())
s=[input().split() for _ in range(h)]
for i in range(h):
    for j in range(w):
        if s[i][j]=="snuke":
            print(chr(ord("A")+j)+str(i+1))

Buggy python submission (verdict: Runtime Error):
h,w=map(int,input().split())
s=[input().split() for _ in range(w)]
for i in range(w):
    for j in range(h):
        if s[i][j]=="snuke":
            print(chr(ord("A")+j)+str(i+1))

Fixed submission:
h,w=map(int,input().split())
s=[input().split() for _ in range(h)]
for i in range(h):
    for j in range(w):
        if s[i][j]=="snuke":
            print(chr(ord("A")+j)+str(i+1))
Buggy python submission (verdict: Runtime Error):
print(R-100*(10-N))

Fixed submission:
N,R=map(int,input().split())
if(N>=10):print(R)
else:print(R+100*(10-N))
Buggy python submission (verdict: Time Limit Exceeded):
# coding: utf-8
import re
import math
import fractions
#import numpy as np

mod=int(10**9+7)

def lcm(a,b):
    return a*b//fractions.gcd(a,b)

#main
N=int(input())
A=list(map(int,input().split()))
l=A[0]
for a in A:
    l=lcm(l,a)

ans=0
for a in A:
    ans+=l//a
    ans%=mod
print(ans)

Fixed submission:
# coding: utf-8
import re
import math
import fractions
#import numpy as np

mod=int(10**9+7)


def lcm(a,b):
    ab=a*b
    return ab//fractions.gcd(a,b)

#main
N=int(input())
A=list(map(int,input().split()))
l=A[0]
for a in range(1,N):
    l=lcm(l,A[a])
l%=mod

ans=0
for a in A:
    ans+=l*pow(a,mod-2,mod)
    ans%=mod
print(ans)

Buggy python submission (verdict: Runtime Error):
# coding: utf-8
import re
import math
#import numpy as np

mod=int(10**9+7)

def lcm(a,b):
    return a*b//math.gcd(a,b)

#main
N=int(input())
A=list(map(int,input().split()))
l=A[0]
for a in A:
    l=lcm(l,a)

ans=0
for a in A:
    ans+=l//a
    ans%=mod
print(ans)

Fixed submission:
# coding: utf-8
import re
import math
import fractions
#import numpy as np

mod=int(10**9+7)


def lcm(a,b):
    ab=a*b
    return ab//fractions.gcd(a,b)

#main
N=int(input())
A=list(map(int,input().split()))
l=A[0]
for a in range(1,N):
    l=lcm(l,A[a])
l%=mod

ans=0
for a in A:
    ans+=l*pow(a,mod-2,mod)
    ans%=mod
print(ans)
Buggy python submission (verdict: Runtime Error):
import math
import re
import time

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

total=(L-1)*N+((1+N)/2)*N
mn=1e9
for a in range(N):
    l=L+(a+1)-1
    total2+=l
    mn=min([mn,abs(l)])
#print("{} - {} = {}".format(total,mn,int(total-mn)))
print(int(total-mn))

Fixed submission:
import math
import re
import time

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

total=(L-1)*N+((1+N)/2)*N
mn=1e9
ans=1e9
for a in range(N):
    l=L+(a+1)-1
    if abs(l)<mn:
        mn=min([mn,abs(l)])
        ans=l
print(int(total-ans))