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

Fixed submission:
h,w,k=map(int,input().split())
x=[]
for i in range(h):
    l=input()
    l2=[]
    for o in range(len(l)):
        l2.append(l[o])
    x.append(l2)
n=2**(h+w)
ans=0
for i in range(n):
    q=i
    num=[0]*(h+w)
    p=0
    while q>0:
        if q%2!=0:
            num[p]=1
        q=q//2
        p+=1
    cnt=0
    for tat in range(h):
        if num[tat]==0:
            for yok in range(w):
                if num[yok+h]==0  and  x[tat][yok]=="#":
                        cnt+=1
    if cnt==k:
        ans+=1
print(ans)

Buggy submission (verdict: Runtime Error):
h,w,k=map(int,input().split())
x=[]
for i in range(h):
    l=input()
    l2=[]
    for o in range(len(l)):
        l2.append(l[o])
    x.append(l2)
n=2**(h+w)
ans=0
for i in range(n):
    q=i
    num=[0]*(h*w)
    p=0
    while q>0:
        if q%2!=0:
            num[p]=1
        q=q//2
        p+=1
    cnt=0
    for tat in range(h):
        if num[tat]==0:
            for yok in range(w):
                if num[yok+h]==0  and  x[tat][yok]=="#":
                        cnt+=1
    if cnt==k:
        ans+=1
print(ans)
Problem p02641 (python)

Fixed submission:
x,n=map(int,input().split())
p=set(list(map(int,input().split())))
ans=0
flag=0
while flag==0:
    if not x-ans in p:
        print(x-ans)
        flag=1
    elif not x+ans in p:
        print(x+ans)
        flag=1
    ans+=1

Buggy submission (verdict: Runtime Error):
x,n=map(int,input().split())
p=set(list(map(int,input().split()))
ans=0
flag=0
while flag==0:
    if not x-ans in p:
        print(x-ans)
        flag=1
    elif not x+ans in p:
        print(x+ans)
        flag=1
    ans+=1
Problem p02687 (python)

Fixed submission:
s=input()
if s=="ABC":
    print("ARC")
else:
    print("ABC")

Buggy submission (verdict: Runtime Error):
s=input()
if s="ABC":
    print("ARC")
else:
    print("ABC")
Problem p02702 (python)

Fixed submission:
s=input()
n=len(s)
s_int=[0]*n
x=(pow(10,n-1))%2019
for i in range(n):
    s_int[i]=(int(s[i])*x)%2019
    x=(x*202)%2019
t=[0]*(n+1)
t[0]=int(s)%2019
for i in range(1,n):
    t[i]=t[i-1]-s_int[i-1]
    t[i]%=2019
t.sort()
t_set=sorted(list(set(t)))
tcnt=[0]*len(t_set)
num=0
for i in range(n+1):
    if t_set[num]==t[i]:
        tcnt[num]+=1
    else:
        num+=1
        tcnt[num]+=1
sum=0
for i in range(len(tcnt)):
    sum+=(tcnt[i]*(tcnt[i]-1))//2
print(sum)

Buggy submission (verdict: Runtime Error):
s=input()
n=len(s)
s_int=[0]*n
x=pow(10,n-1)
for i in range(n):
    s_int[i]=int(s[i]*x)%2019
Problem p02715 (python)

Fixed submission:
n,k=map(int,input().split())
l=[0]*(k+1)
for i in range(k):
    num=(k-i)
    if k//num==1:
        l[num]=1
    else:
        ret=pow(k//num,n,10**9+7)
        for j in range(2,k//num+1):
            ret-=l[num*j]
            ret%=(10**9+7)
        l[num]=(ret)%(10**9+7)
ans=0
for i in range(k+1):
    ans+=(l[i]*i)%(10**9+7)
print(ans%(10**9+7))

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
l=[0]*(k+1)
for i in range(k):
    num=(k-i)
    if k//num==1:
        l[num]=1
    else:
        ret=(k//num,n,10**9+7)
        for j in range(2,k//num+1):
            ret-=l[num*j]
            ret%=(10**9+7)
        l[num]=(ret)%(10**9+7)
ans=0
for i in range(k+1):
    ans+=(l[i]*i)%(10**9+7)
print(ans%(10**9+7))
Problem p02741 (python)

Fixed submission:
k=int(input())
a=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
print(a[k-1])

Buggy submission (verdict: Runtime Error):
h,w=map(int,input().split())
if h==1 or w==1:
    print(1)
    exit()
if h%2+w%2==0:
    print((h//2)*w)
elif h%2==1 and w%2==0:
    print((w//2)*h)
elif w%2==1 and h%2==0:
    print((h//2)*w)
else:
    print((h//2+1)*(w-w//2)+(h//2)*(w//2))
Problem p02747 (python)

Fixed submission:
s=input().replace("hi","")
if len(s)==0:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
s=input().relpace("hi","")
if len(s)==0:
    print("Yes")
else:
    print("No")
Problem p02756 (python)

Fixed submission:
s=input()
q=int(input())
cnt1=0
s_mae=[]
s_ushiro=[]
for i in range(q):
    query=list(input().split())
    if int(query[0])==1:
        cnt1+=1
    else:
        if (int(query[1])+cnt1)%2==0:
            s_ushiro.append(query[2])
        else:
            s_mae.append(query[2])
s1=""
for i in range(len(s_mae)):
    s1=s1+s_mae[-1-i]
s2="".join(s_ushiro)
ans=s1+s+s2
if cnt1%2==0:
    print(ans)
else:
    ans2=""
    for i in range(len(ans)):
        ans2=ans2+ans[-1-i]
    print(ans2)

Buggy submission (verdict: Runtime Error):
s=input()
q=int(input())
cnt1=0
s_mae=[]
s_ushiro=[]
for i in range(q):
    query=list(input().split())
    if int(query[0])==1:
        cnt1+=1
    else:
        if (int(query[1])+cnt1)%2==0:
            s_ushiro.append(query[2]])
        else:
            s_mae=[query[2]]+s_mae
ans="".join(s_mae)+s+"".join(s_ushiro)
if cnt1%2==0:
    print(ans)
else:
    ans2=""
    for i in range(len(ans)):
        ans2=ans2+ans[-1-i]
        print(ans2)

Buggy submission (verdict: Runtime Error):
q=int(input())
cnt1=0
for i in range(q):
    query=list(input().split())
    if int(query[0])==1:
        cnt1+=1
    else:
        if (int(query[1])+cnt1)%2==0:
            s.join(query[2])
        else:
            query[2].join(s)
if cnt1%2==0:
    print(s)
else:
    s2=""
    for i in range(len(s)):
        s2.join(s[-1-i])
    print(s2)
Problem p02772 (python)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
for i in range(n):
    if a[i]%2==0:
        if a[i]%3!=0 and a[i]%5!=0:
            print("DENIED")
            exit()
print("APPROVED")

Buggy submission (verdict: Runtime Error):
n=int(input())
a=map(int,input().split())
for i in range(n):
    if a[i]%2==0:
        if a[i]%3!=0 and a[i]%5!=0:
            print("DENIED")
            exit()
print("APPROVED")
Problem p02801 (python)

Fixed submission:
c=input()
print(chr(ord(c)+1))

Buggy submission (verdict: Runtime Error):
a

a

Buggy submission (verdict: Runtime Error):
aaaa

Buggy submission (verdict: Runtime Error):
aa

Buggy submission (verdict: Runtime Error):
a

Buggy submission (verdict: Runtime Error):
a        a

Buggy submission (verdict: Runtime Error):
aaaaaaaaaa

Buggy submission (verdict: Runtime Error):
#min
minsum=0
for i in range(n):
    if n-(i+1)>=k-1:
        minsum+=(a[i] * comb(n-i-1,k-1))%M
        minsum%=M
b=sorted(a,reverse=True)
#max
maxsum=0
for i in range(n):
    if n-(i+1)>=k-1:
        maxsum+=(b[i] * comb(n-i-1,k-1))%M
        maxsum%=M
print((maxsum-minsum)%M)
Problem p02804 (python)

Fixed submission:
n,k=map(int,input().split())
a=sorted(list(map(int,input().split())))
num=[1]
M=10**9+7
for i in range(n):
    x=(num[i]*(i+1))%M
    num.append(x)
def inverse(number,mod):
    m=mod-2
    mod2=""
    while m!=0:
        if m%2==0:
            mod2="0"+mod2
        else:
            mod2="1"+mod2
        m=m//2
    two=[]
    for i in range(len(mod2)):
        if mod2[len(mod2)-1-i]=="1":
            two.append(i)
    ret=1
    for i in two:
        v=i
        retsub=number
        while v>0:
            retsub=retsub**2
            retsub=retsub%mod
            v-=1
        ret*=retsub
    ret=ret%mod
    return ret
def comb(p,q):
    ret1=num[p]
    ret2=inverse(num[p-q],M)
    ret3=inverse(num[q],M)
    ret=(ret1*ret2*ret3)%M
    return ret
#min
minsum=0
for i in range(n):
    if n-(i+1)>=k-1:
        minsum+=(a[i] * comb(n-i-1,k-1))%M
        minsum%=M
b=sorted(a,reverse=True)
#max
maxsum=0
for i in range(n):
    if n-(i+1)>=k-1:
        maxsum+=(b[i] * comb(n-i-1,k-1))%M
        maxsum%=M
print((maxsum-minsum)%M)

Buggy submission (verdict: Runtime Error):
#min
minsum=0
for i in range(n):
    if n-(i+1)>=k-1:
        minsum+=(a[i] * comb(n-i-1,k-1))%M
        minsum%=M
b=sorted(a,reverse=True)
#max
maxsum=0
for i in range(n):
    if n-(i+1)>=k-1:
        maxsum+=(b[i] * comb(n-i-1,k-1))%M
        maxsum%=M
print((maxsum-minsum)%M)

Buggy submission (verdict: Runtime Error):
#min
minsum=0
for i in range(n):
    if n-(i+1)>=k-1:
        minsum+=(a[i] * comb(n-i-1,k-1))%M
        minsum%=M
b=sorted(a,reverse=True)
#max
maxsum=0
for i in range(n):
    if n-(i+1)>=k-1:
        maxsum+=(b[i] * comb(n-i-1,k-1))%M
        maxsum%=M
print((maxsum-minsum)%M)
Problem p02853 (python)

Fixed submission:
x,y=map(int,input().split())
a=[300000,200000,100000]
b=[0]*300
a=a+b
add=0
if x*y==1:
    add=400000
print(a[x-1]+a[y-1]+add)

Buggy submission (verdict: Runtime Error):
x,y=map(int,input().split())
a=[300000,200000,100000]
add=0
if x*y==1:
    add=400000
print(a[x-1]+a[y-1]+add)

Buggy submission (verdict: Runtime Error):
x,y=int(input())
a=[300000,200000,100000]
add=0
if x*y==1:
    add=400000
print(a[x-1]+a[y-1]+add)
Problem p02885 (python)

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

Buggy submission (verdict: Runtime Error):
a,b=map(int,print().split())
print(max(a-b*2,0))
Problem p02909 (python)

Fixed submission:
S=str(input())
if S=="Sunny":
    print("Cloudy")
elif S=="Cloudy":
    print("Rainy")
else:
    print("Sunny")

Buggy submission (verdict: Runtime Error):
S=str(input())
if S="Sunny":
    print("Cloudy")
elif S="Cloudy":
    print("Rainy")
else:
    print("Sunny")

Buggy submission (verdict: Runtime Error):
S=input()
if S="Sunny":
    print("Cloudy")
elif S="Cloudy":
    print("Rainy")
else:
    print("Sunny")
Problem p02975 (python)

Fixed submission:
n=int(input())
a=sorted(list(map(int,input().split())))
b=sorted(list(set(a)))
l=len(b)
if l>=4:
    print("No")
    exit()
else:
    if l==1:
        if b[0]==0:
            print("Yes")
        else:
            print("No")
    elif l==2:
        if n%3!=0:
            print("No")
        else:
            if b[0]!=0:
                print("No")
            else:
                cnt1=a.count(b[0])
                cnt2=a.count(b[1])
                if cnt2==(n//3)*2:
                    print("Yes")
                else:
                    print("No")
    else:
        if n%3!=0:
            print("No")
        else:
            cnt1=a.count(b[0])
            cnt2=a.count(b[1])
            cnt3=a.count(b[2])
            if cnt1!=n//3 or cnt2!=n//3 or cnt3!=n//3:
                print("No")
            else:
                if b[0]^b[2]!=b[1]:
                    print("No")
                else:
                    print("Yes")

Buggy submission (verdict: Runtime Error):
n=int(input())
a=sorted(list(map(int,input().split())))
b=sorted(list(set(a)))
l=len(b)
if l>=4:
    print("No")
    exit()
else:
    if l==1:
        if b[0]==0:
            print("Yes")
        else:
            print("No")
    elif l==2:
        if n%3!=0:
            print("No")
        else:
            if b[0]!=0:
                print("No")
            else:
                cnt1=a.count(b[0])
                cnt2=a.count(b[1])
                if cnt2==(n//3)*2:
                    print("Yes")
                else:
                    print("No")
    else:
        if n%3!=0:
            print("No")
        else:
            cnt1=a.count(b[0])
            cnt2=a.count(b[1])
            cnt3=a.count(b[2])
            print(cnt1,cnt2,cnt3)
            if cnt1!=n//3 or cnt2!=n//3 or cnt3!=n//3:
                print("No")
            else:
                if b[0]^b[2]!=b[3]:
                    print("No")
                else:    
                    print("Yes")
Problem p03006 (python)

Fixed submission:
n=int(input())
l=[]
for i in range(n):
    x,y=map(int,input().split())
    l.append([x,y])
l=sorted(l)
s=set()
for j in range(n-1):
    for k in range(j,n):
        s.add((l[k][0]-l[j][0],l[k][1]-l[j][1]))
s_l=sorted(list(s))
cnt=[0]*len(s_l)
dic={}
for i in range(len(s_l)):
    dic[s_l[i]]=i
for j in range(n-1):
    for k in range(j+1,n):
        cnt[dic[(l[k][0]-l[j][0],l[k][1]-l[j][1])]]+=1
if n==1:
    print(1)
    exit()
print(n-max(cnt))

Buggy submission (verdict: Runtime Error):
n=int(input())
l=[]
for i in range(n):
    x,y=map(int,input().split())
    l.append([x,y])
l=sorted(l)
s=set()
for j in range(n-1):
    for k in range(j,n):
        s.add((l[k][0]-l[j][0],l[k][1]-l[j][1]))
s_l=sorted(list(s))
cnt=[0]*len(s_l)
dic={}
for i in range(len(s_l)):
    dic[s_l[i]]=i
for j in range(n-1):
    for k in range(j+1,n):
        cnt[dic[(l[k][0]-l[j][0],l[k][1]-l[j][1])]]+=1

print(n-max(cnt))
Problem p03059 (python)

Fixed submission:
a,b,t=map(int,input().split())
T=a
ans=0
while T<t+0.5:
    ans+=b
    T+=a
print(ans)

Buggy submission (verdict: Runtime Error):
a,b,t=map(int,input().split())
T=a
cnt=0
while T<=t:
    ans+=b
    T+=a
print(cnt)
Problem p03076 (python)

Fixed submission:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
list=[a,b,c,d,e]
if a%10==0 and b%10==0 and c%10==0 and d%10==0 and e%10==0:
    print(sum(list))
    exit()
min=100
for i in range(len(list)):
    if list[i]%10!=0 and list[i]%10<min:
        memo=list[i]
        min=list[i]%10
flag=0
for k in range(len(list)):
    if list[k]==memo and flag==0:
        flag=1
    else:
        while list[k]%10!=0:
            list[k]+=1
print(sum(list))

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
list=[a,b,c,d,e]
min=100
for i in range(len(list)):
    if list[i]%10!=0 and list[i]%10<min:
        memo=list[i]
        min=list[i]%10
flag=0
for k in range(len(list)):
    if list[k]==memo and flag==0:
        flag=1
    else:
        while list[k]%10!=0:
            list[k]+=1
print(sum(list))
Problem p03160 (python)

Fixed submission:
n=int(input())
h=list(map(int,input().split()))
dp=[0 for _ in range(n+1)]
dp[2]=abs(h[1]-h[0])
for i in range(2,n):
    dp[i+1]=min(dp[i]+abs(h[i]-h[i-1]),dp[i-1]+abs(h[i]-h[i-2]))
print(dp[n])

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
h=list(map(int,input().split()))
dp=[0 for _ in range(n+1)]
dp[2]=abs(h[1]-h[0])
for i in range(2,n):
    dp[i+1]=999999999
    for x in range(min(k,i)):
        if dp[i+1]>dp[i-x]+abs(h[i]-h[i-1-x]):
            dp[i+1]=dp[i-x]+abs(h[i]-h[i-1-x])
print(dp[n])
Problem p03220 (python)

Fixed submission:
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
temp=9999
for i in range(len(h)):
    if temp>abs((t-h[i]*0.006)-a):
        temp=abs((t-h[i]*0.006)-a)
        ans=i+1
print(ans)

Buggy submission (verdict: Runtime Error):
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
temp=9999
for i in h:
    if temp>abs((t-h[i]*0.006)-a):
        temp=abs((t-h[i]*0.006)-a)
        ans=i+1
print(ans)
Problem p03239 (python)

Fixed submission:
n,T=map(int,input().split())
ans=9999
flag=0
for _ in range(n):
    c,t=map(int,input().split())
    if T>=t and c<ans:
        ans=c
        flag=1
if flag==0:
    print("TLE")
else:
    print(ans)

Buggy submission (verdict: Runtime Error):
n,T=map(int,input().split())
c=[0]*n
t=[0]*n
ans=[]
for i in range(n):
    c[i],t[i]=map(int,input().split())
    if t[i]<=T:
        ans.append(c[i])
print(min(ans))
Problem p03262 (python)

Fixed submission:
import fractions
n,x=map(int,input().split())
a=list(map(int,input().split()))
for i in range(n):
    a[i]=abs(a[i]-x)
a=sorted(a)
ans=a[0]
for k in a:
    ans=fractions.gcd(ans,k)
print(ans)

Buggy submission (verdict: Runtime Error):
import math
n,x=map(int,input().split())
a=list(map(int,input().split()))
for i in range(n):
    a[i]=abs(a[i]-x)
a=sorted(a)
ans=a[0]
for k in a:
    ans=math.gcd(ans,k)
print(ans)
Problem p03285 (python)

Fixed submission:
n=int(input())
a=[]
for x in range(15):
    for y in range(26):
        a.append(x*7+y*4)
if not n in a:
    print("No")
else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
n=int(input())
a=[]
for x in range(15):
    for y in range(26):
        a.append(x*7+y*4)
if not n in a:
    print("No")
else:
    print("Yes)

Buggy submission (verdict: Runtime Error):
n=int(input())
if n%11==0 or n%7==0 or n%4==0 or n%11==4 or n%7==4 n%11==7:
    print("Yes")
else:
    print("No")
Problem p03324 (python)

Fixed submission:
d,n=map(int,input().split())
if n==100:
    print((n+1)*(100**d))
else:
    print(n*(100**d))

Buggy submission (verdict: Runtime Error):
d,n=,map(int,input().split())
print(n*(100**d))
Problem p03325 (python)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
s=0
for i in range(len(a)):
    x=0
    while x==0:
        if a[i]%2!=0:
            x=1
        else:
            s+=1
            a[i]/=2
print(s)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
s=0
for i in range(a):
    x=0
    while x==0:
        if a[i]%2!=0:
            x=1
        else:
            s+=1
            a[i]/=2
print(s)
Problem p03328 (python)

Fixed submission:
a,b=map(int,input().split())
c=(b-a)
s=0
for i in range(1,c+1):
    s+=i
print(s-b)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
c=(b-c)
s=0
for i in range(1,c+1):
    s+=i
print(s-b)
Problem p03386 (python)

Fixed submission:
a,b,k=map(int,input().split())
if b-a+1<=2*k:
    for i in range(a,b+1):
        print(i)
else:
    for j in range(k):
        print(a+j)
    for l in range(k):
        print(b-k+1+l)

Buggy submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
if b-a+1<=2k:
    for i in range(a,b+1):
        print(i)
else:
    for j in range(k):
        print(a+j)
    for l in range(k):
        print(b-k+1+l)
Problem p03400 (python)

Fixed submission:
n=int(input())
d,x=map(int,input().split())
s=0
for i in range(n):
    w=0
    a=int(input())
    while d>=w*a+1:
        s+=1
        w+=1
print(s+x)

Buggy submission (verdict: Runtime Error):
n=int(input())
d,x=map(int,input().split())
s=0
for i in range(n):
    w=0
    while d>=w*int(input())+1:
        s+=1
        w+=1
print(s+x)
Problem p03408 (python)

Fixed submission:
n=int(input())
s=[]
for x in range(n):
    s.append(input())
m=int(input())
t=[]
for y in range(m):
    t.append(input())
q=0
for i in range(n):
    v=s[i]
    c=0
    for k in range(i,n):
        if v==s[k]:
            c+=1
    for j in range(m):
        if v==t[j]:
            c-=1
    if c>q:
        q=c
print(q)

Buggy submission (verdict: Runtime Error):
n=int(input())
s=[]
for x in range(n):
    s.append(input())
m=int(input())
t=[]
for y in range(m):
    t.append(input())
m=0
for i in range(n):
    v=s[i]
    c=0
    for k in range(i,n):
        if v==s[k]:
            c+=1
    for j in range(m):
        if v==t[j]:
            c-=1
    if c>m:
        m=c
print(m)
Problem p03416 (python)

Fixed submission:
a,b=map(int,input().split())
s=0
for i in range(a,b+1):
    x=list(str(i))
    y=[]
    for k in range(len(x)):
        y.append(x[-1-k])
    z=""
    for j in y:
        z+=j
    if i==int(z):
        s+=1
print(s)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
s=0
for i in range(a,b+1):
    x=list(str(i))
    y=[]
    for k in range(len(x)):
        y.append(x[len(x)-i-1])
    z=""
    for j in y:
        z+=j
    if i==int(z):
        s+=1
print(s)
Problem p03424 (python)

Fixed submission:
n=int(input())
a=set(list(input().split()))
if len(a)==3:
    print("Three")
else:
    print("Four")

Buggy submission (verdict: Runtime Error):
n=iny(input())
a=set(list(input().split()))
if len(a)==3:
    print("Three")
else:
    print("Four")

Buggy submission (verdict: Runtime Error):
n=iny(input())
a=set(list(input().split())
if len(a)==3:
    print("Three")
else:
    print("Four")
Problem p03485 (python)

Fixed submission:
a,b=map(int,input().split())
X=str((a+b)*5)
x=int(X[-1])
if x>=5:
    print((a+b)//2+1)
else:
    print((a+b)//2)

Buggy submission (verdict: Runtime Error):
a.b=map(int,input().split())
X=str((a+b)*5)
x=int(X[-1])
if x>=5:
    print((a+b)//2+1)
else:
    print((a+b)//2)
Problem p03502 (python)

Fixed submission:
x=input()
f=0
for i in range(len(x)):
    f+=int(x[i])
if int(x)%f==0:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
x=input()
f=0
for i in range(len(x)):
    f+=int(x[i])
if x%f==0:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
x=input()
f=0
for i in len(x):
    f+=int(x[i])
if x%f==0:
    print("Yes")
else:
    print("No")
Problem p03547 (python)

Fixed submission:
x,y=input().split()
if x==y:
    print("=")
else:
    if x==min(x,y):
        print("<")
    else:
        print(">")

Buggy submission (verdict: Runtime Error):
x,y=input().split()
a=list(set(x,y))
sorted(a)
if len(a)==1:
    print("=")
else:
    if x==a[0]:
        print("<")
    else:
        print(">")
Problem p03555 (python)

Fixed submission:
s1=list(input())
s2=list(input())
a=[s1,s2]
for x in range(3):
    if a[0][x]!=a[1][2-x]:
        print("NO")
        exit()
print("YES")

Buggy submission (verdict: Runtime Error):
s1=list(input())
s2=list(input())
a=[s1,s2]
for x in range3:
    if a[0][x]!=a[1][2-x]:
        print("NO")
        exit()
print("YES")
Problem p03633 (python)

Fixed submission:
import fractions as frac
n=int(input())
t=[int(input()) for _ in range(n)]
x=t[0]
ans=t[0]
for i in range(1,n):
    g=frac.gcd(x,t[i])
    ans=x*t[i]//g
    x=ans
print(int(ans))

Buggy submission (verdict: Runtime Error):
import fractions as frac
n=int(input())
t=[int(input()) for _ in range(n)]
x=t[0]
ans=t[0]
for i in range(1,n):
    g=frac.gcd(x,t[i])
    ans=x*y//g
    x=ans
print(int(ans))

Buggy submission (verdict: Runtime Error):
import fractions as frac
n=int(input())
t=[int(input()) for _ in range(n)]
t=sorted(set(t))
t1=t[0]
if n==1:
    print(t1)
    exit()
for i in range(1,len(t)):
    t2=t[i]
    ans=t1*t2/frac.gcd(t1,t2)
    t1=ans
print(int(ans))

Buggy submission (verdict: Runtime Error):
import fractions as frac
n=int(input())
t=[int(input()) for _ in range(n)]
t=sorted(set(t))
t1=t[0]
if n==1:
    print(t1)
    exit()
for i in range(1,len(t)):
    t2=t[i]
    ans=t1*t2/frac.gcd(t1,t2)
    t1=ans
print(int(ans))

Buggy submission (verdict: Runtime Error):
import fractions as frac
n=int(input())
t=[int(input()) for _ in range(n)]
t1=t[0]
for i in range(1,n):
    t2=t[i]
    ans=t1*t2/frac.gcd(t1,t2)
    t1=ans
print(int(ans))

Buggy submission (verdict: Runtime Error):
import fractions as frac
n=int(input())
t=[int(input()) for _ in range(n)]
t1=t[0]
for i in range(1,n):
    t2=t[i]
    ans=t1*t2/frac.gcd(t1,t2)
    t1=ans
print(int(ans))

Buggy submission (verdict: Runtime Error):
import fractions as frac
n=int(input())
t1=int(input())
for i in range(n-1):
    t2=int(input())
    ans=t1*t2/frac.gcd(t1,t2)
    t1=ans
print(int(ans))

Buggy submission (verdict: Runtime Error):
import fractions as frac
n=int(input())
t1=int(input())
for i in range(n-1):
    t2=int(input())
    ans=t1*t2/frac.gcd(t1,t2)
    t1=t2
print(int(ans))
Problem p03636 (python)

Fixed submission:
s=input()
a=s[0]
z=s[-1]
s=s[1:-1]
print(a+str(len(s))+z)

Buggy submission (verdict: Runtime Error):
s=input()
a=s[0]
z=s[-1]
s=[1:-1]
print(a+str(len(s))+z)
Problem p03671 (python)

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

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,nput().split())
print(min(a+b,a+c,b+c))
Problem p03719 (python)

Fixed submission:
a,b,c=map(int,input().split())
if a<=c<=b:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
list=[0]*(10**5+1)
for i in range(n):
    a,b=map(int,input().split())
    list[a]+=b
sum=0
for l in range(1,len(list)):
    sum+=list[l]
    if sum>=k:
        print(l)
        exit()
Problem p03720 (python)

Fixed submission:
n,m=map(int,input().split())
x=[0]*n
for i in range(m):
    a,b=map(int,input().split())
    x[a-1]+=1
    x[b-1]+=1
for k in range(n):
    print(x[k])

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
s=""
for i in range(m):
    a,b=input().split()
    s=s+a+b
for k in range(n)
    print(s.count(str(k+1)))