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

Fixed submission:
n=int(input())
l=list(map(int,input().split()))
count=0
for i in range(n):
    if i%2==0 and l[i]%2==1:
        count += 1
print(count)

Buggy submission (verdict: Runtime Error):
n=input()
l=list(map(int,input().split()))
count=0
for i in range(n):
    if i%2==1 and l[i]%2==1:
        count += 1
print(count)

Buggy submission (verdict: Runtime Error):
n=input()
l=list(map(int,input().split))
count=0
for i in range(n):
    if i%2==1 and l%2==1:
        count += 1
print(count)

Buggy submission (verdict: Runtime Error):
n=input()
l=list(map(int,input().split))
l.sort()
count=0
for i in range(n):
    if i%2==1 and l[i]%2==1:
        count += 1
print(count)
Problem p02612 (python)

Fixed submission:

n=int(input())
if n%1000==0:
    print('0')
else:
    k = n
    k += 1000
    k //= 1000
    cha = k*1000-n
    print(cha)

Buggy submission (verdict: Runtime Error):
N=int(input())
s=[]
for i in range(N):
    s.append(input())
print("AC x ",s.count("AC"))
print("WA x ",s.count("WA"))
print("TLE x ",s.count("TLE"))
print("RE x ",s.count("RE"))
Problem p02613 (python)

Fixed submission:
N=int(input())
s=[]
for i in range(N):
    s.append(input())
print("AC x ",s.count("AC"))
print("WA x ",s.count("WA"))
print("TLE x ",s.count("TLE"))
print("RE x ",s.count("RE"))

Buggy submission (verdict: Runtime Error):
N=int(input())
s=""
for i in range(N):
    s.append(input())
print("AC x ".join(s.count("AC")))
print("WA x ".join(s.count("WA")))
print("TLE x ".join(s.count("TLE")))
print("RE x ".join(s.count("RE")))

Buggy submission (verdict: Runtime Error):
N=int(input())
s=[]
for i in range(N):
    s.append(input())
print("AC x "+s.count("AC"))
print("WA x "+s.count("WA"))
print("TLE x "+s.count("TLE"))
print("RE x "+s.count("RE"))

Buggy submission (verdict: Runtime Error):
N=int(input())
s=" "
for i in range(N):
    s.append(input())
print("AC x "+s.count("AC"))
print("WA x "+s.count("WA"))
print("TLE x "+s.count("TLE"))
print("RE x "+s.count("RE"))

Buggy submission (verdict: Runtime Error):

N=int(input())
s=""
for i in range(N):
    s.append(input())
print('AC x '+s.count('AC'))
print('WA x '+s.count('WA'))
print('TLE x '+s.count('TLE'))
print('RE x '+s.count('RE'))
Problem p02724 (python)

Fixed submission:
n=int(input())
k=n//500
n -= k*500
n //= 5
print(k*1000+n*5)

Buggy submission (verdict: Runtime Error):
n=input()
k=n%500
n -= k*500
n //= 5
print(k*1000+n*5)
Problem p02789 (python)

Fixed submission:
N,M = (int(i) for i in input().split())
if N==M: 
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
f,s=map(int,input.split())
if f==s:
    print('Yes')
else :
    print('No')

Buggy submission (verdict: Runtime Error):
f,s=map(int,input.split())
if f==s:
    print('Yes')
elif :
    print('No')
Problem p02886 (python)

Fixed submission:

n=int(input())
d=list(map(int,input().split()))
s=0
for i in range(n):
    for j in range(i+1,n):
        s += d[i]*d[j]
print(s)

Buggy submission (verdict: Runtime Error):
n=int(input())
d=list(map(int,input().split()))
s=0
for i in range(n):
    for j in range[i+1:]:
        s += d[i]*d[j]
print(s)

Buggy submission (verdict: Runtime Error):
n=int(input())
d=list(map(int,input().split()))
s=0
for i in range(n):
    for j in range(i+1:):
        s += i*j
print(s)
Problem p02952 (python)

Fixed submission:
n=input()
if len(n)==1:
    print(n)
elif len(n)==2:
    print('9')
elif len(n)==3:
    print(int(n)-90)
elif len(n)==4:
    print('909')
elif len(n)==5:
    print(int(n)-9090)
else:
    print('90909')

Buggy submission (verdict: Runtime Error):
n=int(input())
if len(n)==1:
    print(n)
elif len(n)==2:
    print(9)
elif len(n)==3:
    print(n-90)
elif len(n)==4:
    print('909')
elif len(n)==5:
    print(n-9090)
else:
    print('90909')
Problem p02958 (python)

Fixed submission:
n=int(input())
p=list(map(int,input().split()))
new_p=sorted(p)
cnt=0

for i in range(n):
    if p[i] != new_p[i]:
        cnt += 1
        
if cnt > 2:
    print('NO')
else:
    print('YES')

Buggy submission (verdict: Runtime Error):

n=int(input())
p=list(map(int,input().split()))
new_p=p.sort()
cnt=0

for i in range(n):
    if p[i] != new_p[i]:
        cnt += 1
        
if cnt > 2:
    print('NO')
else:
    print('YES')

Buggy submission (verdict: Runtime Error):
n=int(input())
p=list(map(int,input().split()))
new_p=p.reverse()
cnt=0

for i in range(n-1):
    if p[i] != new_p[i]:
        cnt += 1
        
if cnt > 2:
    print('NO')
else:
    print('YES')

Buggy submission (verdict: Runtime Error):
n=int(input())
p=list(map(int,input().split()))
new_p=p.reverse()

for i in range(n):
    if p[i]<p[i+1]:
        tmp=p[i]
        p[i]=p[i+1]
        p[i+1]=tmp
        break
if new_p==p:
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
n=int(input())
p=list(map(int,input().split()))
new_p=p.reversesort()

for i in range(n-1):
    if p[i]<=p[i+1]:
        tmp=p[i]
        p[i]=p[i+1]
        p[i+1]=tmp
        break
if new_p==p:
    print('YES')
else:
    print('NO')
Problem p02988 (python)

Fixed submission:
n=int(input())
p=list(map(int,input().split()))
count=0
for i in range(0,n-2):
    if (p[i]<p[i+1] and p[i+1]<p[i+2]) or (p[i]>p[i+1] and p[i+1]>p[i+2]):
        count += 1
print(count)

Buggy submission (verdict: Runtime Error):
n=int(input())
p=map(int,input().split())
count=0
for i in range(0,n-2):
    if (p[i]<p[i+1] and p[i+1]<p[i+2]) or (p[i]>p[i+1] and p[i+1]>p[i+2]):
        count += 1
print(count)

Buggy submission (verdict: Runtime Error):
n=int(input())
p=map(int,input().split())
count=0
for i in range(0,n-3):
    if (p[i]<p[i+1] and p[i+1]<p[i+2]) or (p[i]>p[i+1] and p[i+1]>p[i+2]):
        count += 1
print(count)
Problem p02994 (python)

Fixed submission:
N,L=map(int,input().split())
s = N*L
for i in range (N+1):
    s += i
s -= N
K=[]
for i in range(1,N+1):  
    K.append(L+i-1)
if 0 <= K[0]:
    s -= K[0]
elif K[0]<0 and K[N-1]>0:
    s = s
else:
    s -= K[N-1]
print(s)

Buggy submission (verdict: Runtime Error):
N,L=map(int,input().split())
s = N*L+sum(1,N+1)-N
K=[]
for i in range(1,N+1):  
    K.append(L+i-1)
if 0 <= K[0]:
    s -= K[0]
elif K[0]<0 and K[N-1]>0:
    s = s
else:
    s -= K[N-1]
print(s)

Buggy submission (verdict: Runtime Error):
N,L=map(int,input().split())
s = N*L+sum(1,N+1)-N
K=''
for i in range(1,N+1):  
    K.append(L+i-1)
if 0 <= K[0]:
    s -= K[0]
elif K[0]<0 and K[N-1]>0:
    s = s
else:
    s -= K[N-1]
print(s)
Problem p03060 (python)

Fixed submission:
n=int(input())
k=0
v=list(map(int,input().split()))
c=list(map(int,input().split()))
for i in range(n):
    if (v[i]-c[i])>0:
        k += (v[i]-c[i])
print(k)

Buggy submission (verdict: Runtime Error):
n=int(input())
k=0
v=[map(int,input().split())]
c=[map(int,input().split())]
for i in range(n):
    if (v[i]-c[i])>0:
        k += (v[i]-c[i])
print(k)

Buggy submission (verdict: Runtime Error):
n=int(input())
k=0
for i in range(n):
    v=map(int,input().split())
    c=map(int,input().split())
    if v>c:
        k += (v-c)
print(k)

Buggy submission (verdict: Runtime Error):
n=int(input())
k=0
for i in range(n):
    v=map(int,input().split())
    c=map(int,input().split())
    if v>c:
        k += (v-c)
print(k)
Problem p03106 (python)

Fixed submission:
a,b,k=map(int,input().split())
N=[]
for i in range(1,min(a,b)+1):
    if (a%i==0 and b%i==0):
            N.append(i)
N.reverse()
print(N[k-1])

Buggy submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
N=""
for i in range(1,min(a,b)):
    if a%i==0 and b%i==0:
            N.append(i)
N.reverse()
print(N[k-1])

Buggy submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
l,s=0
N=""
while s < k:
    l += 1
    if a%(l+1)==0 and b%(l+1)==0:
            s += 1
            N.append(l)
N.reverse()
print(N[k-1])

Buggy submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
l,s=0
while s < k:
    l += 1
    if a%(l+1)==0 and b%(l+1)==0:
            s += 1
print(l)
Problem p03109 (python)

Fixed submission:

y,m,d=map(int,input().split('/'))
if y < 2020 and m < 5:
    print('Heisei')
else:
    print('TBD')

Buggy submission (verdict: Runtime Error):
y,m,d=map(int,input().split('/'))
if y < 2020 and m < 05:
    print('Heisei')
else:
    print('TBD')
Problem p03110 (python)

Fixed submission:
n=int(input())
kei = 0.0
for i in range(n):
    x,u=map(str,input().split())
    if u=="JPY":
        kei += float(x)
    else:
        kei += float(x)*380000.0
print(kei)

Buggy submission (verdict: Runtime Error):
n=int(input())
kei = 0.0
for i in range(n):
    x,u=map(str,input().split())
    if u=="JPY":
        kei += float(x[i])
    else:
        kei += float(x[i])*380000.0
print(kei)

Buggy submission (verdict: Runtime Error):
n=int(input())
kei = 0.0
for i in range(n):
    x=list(input().split())
    u=list(map(str,input().split()))
    if u[i]=="JPY":
        kei += float(x[i])
    else:
        kei += float(x[i])*380000.0
print(kei)

Buggy submission (verdict: Runtime Error):
n=int(input())
kei = 0.0
for i in range(n):
    x,u=list(map(input().split()))
    if u[i]=="JPY":
        kei += float(int(x[i]))
    else:
        kei += float(x[i])*380000.0
print(kei)

Buggy submission (verdict: Runtime Error):
n=int(input())
kei = 0.0
for i in range (n):
    x,u=list(map(input().split()))
    if u[i]=="JPY":
        kei += float(int(x[i]))
    else:
        kei += float(x[i])*380000.0
print(kei)

Buggy submission (verdict: Runtime Error):
n=int(input())
kei = 0.0
for i in range (n):
    x,u=list(map(input().split()))
    if u[i]=='JPY':
        kei += float(int(x[i]))
    else:
        kei += float(x[i])*380000
print(kei)

Buggy submission (verdict: Runtime Error):
n=int(input())
kei = 0
for i in range (n):
    x,u=list(map(input().split()))
    if u[i]=='JPY':
        kei += int(x[i])
    else:
        kei += int(x[i])*380000
print(kei)
Problem p03136 (python)

Fixed submission:
n=int(input())
L=list(map(int,input().split()))
L.sort()
ans=sum(L)-L[n-1]
if ans>L[n-1]:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):

n=int(input())
L=list(map(int,input().split()))
L.sort()
ans=sum(L[:n-1])
if ans>L[n-1:n]:
    print('Yes')
else:
    print('No')
Problem p03192 (python)

Fixed submission:

N=input()
cnt=N.count('2')
print(cnt)

Buggy submission (verdict: Runtime Error):

N=int(input())
cnt=N.count('2')
print(cnt)

Buggy submission (verdict: Runtime Error):

N=list(int(input()))
cnt=N.count('2')
print(cnt)
Problem p03227 (python)

Fixed submission:

S=str(input())
if len(S)==2:
    print(S)
else:
    print(S[::-1])

Buggy submission (verdict: Runtime Error):
S=str(input())
if len(S)==2:
    print(S)
else:
    print(S.reverse())
Problem p03239 (python)

Fixed submission:
N,T=map(int,input().split())
k=1000
l=1
for i in range(N):
    c,t=map(int,input().split())
    if t <= T:
        l=0
        if c < k:
            k = c
if l==1:
    print('TLE')
else:
    print(k)

Buggy submission (verdict: Runtime Error):
N,T=map(int,input().split())
k=1000
l=1
for i in range(N):
    c,t = int(input())
    if t[i] <= T:
        l=0
        if c[i] < k:
            k = c[i]
if l==1:
    print('TLE')
else:
    print(k)

Buggy submission (verdict: Runtime Error):
n,T=map(int,input().split())
c=list(map(int,input().split('\n')))
k=1000
l=1
for i in range(n):
    if c[i][1] <= T:
        l=0
        if c[i][0] < k:
            k = c[i][0]
if l==1:
    print('TLE')
else:
    print(k)
Problem p03243 (python)

Fixed submission:
n=input()
k = int(n) % 111
if k==0:
    print(n)
else:
    if n[0]>n[1] or (n[0]==n[1] and n[1]>n[2]):
        print(n[0]*3)
    else:
        print((str(int(n[0])+1))*3)

Buggy submission (verdict: Runtime Error):
n=input()
l=len(n)
k=0
for i in range(l):
    for j in range(i,l):
        if n[i]!=n[j]:
            k=1
            
if k==1:
    if n[0]>n[1]:
        print(n[0]*l)
    else:
        print((n[0]+1)*l)
        
else:
    print(n)
Problem p03280 (python)

Fixed submission:

a,b=map(int,input().split())
print((a-1)*(b-1))

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
print((a-1)*(b-1))

Buggy submission (verdict: Runtime Error):
print(((int(input()))-1) *((int(input()))-1) )
Problem p03316 (python)

Fixed submission:
n=input()
s=0
for i in range(len(n)):
    s += int(n[i])
if int(n)%s == 0:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
n=input()
s=0
for i in range(len(n)):
    s += n[i]
if int(n)%s == 0:
    print('Yes')
else:
    print('No')
Problem p03400 (python)

Fixed submission:
n=int(input())
d,x=map(int,input().split())
cnt=n
for i in range(n):
    a=int(input())
    b = a+1
    while b <= d:
        cnt += 1
        b += a
print(cnt+x)

Buggy submission (verdict: Runtime Error):
n=int(input())
d,x=map(int,input().split())
a=list(map(int,input().split('\n')))
b=[]
cnt=n
for i in range(n):
    b[i] = 1
    while b[i]<=d:
        b[i] += a[i]
        cnt += 1
print(cnt+x)
Problem p03447 (python)

Fixed submission:
x,a,b = [int(input()) for i in range(3)]
print((x-a)%b)

Buggy submission (verdict: Runtime Error):

X=input()
A=input()
B=input()
X -= A
Y = X % B
print(Y)

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

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

Buggy submission (verdict: Runtime Error):
a,b,c=[int(input())for i in range(3)]
a-=b
a%=c
    print(a)
Problem p03456 (python)

Fixed submission:
a,b=input().split()
s=0
s += int(b)
s += int(a)*(10**len(b))
for i in range(320):
    if s==i*i:
        print('Yes')
        exit()
print('No')

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
s=0
s += b
s += a*(10**len(b))
for i in range(320):
    if s==i*i:
        print(i)
        exit()

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
s=0
s += b
s += b*(10**len(a))
for i in range(320):
    if s==i*i:
        print(i)
        exit()

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
s=0
s += b
s += a*(10**len(a))
for i in range(320):
    if s==i*i:
        print(i)
        exit()

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
s=0
s += b
s += a*(10*len(a))
for i in range(320):
    if s==i*i:
        print(i)
        exit()
Problem p03470 (python)

Fixed submission:
n=int(input())
k=[]
for i in range(n):
    d = int(input())
    k.append(d)
print(len(set(k)))

Buggy submission (verdict: Runtime Error):
n=int(input())
d=list(int(input()) for i in range(n))
cnt=0
st=100
l=[]
for i in range(n):
    if d<st:
        cnt += 1
        st = d
    else:
        l.append(cnt)
        st = 100
        cnt = 0
l.sort()
print(l[len(l)-1])

Buggy submission (verdict: Runtime Error):
n=int(input())
d=list(int(input()) for i in range(n))
cnt=0
st=100
l=[]
for i in range(n):
    if d<st:
        cnt += 1
        st = d
    else:
        l.append(cnt)
        st = 100
print(max(l))
Problem p03502 (python)

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

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

Buggy submission (verdict: Runtime Error):
n=int(input())
s=len(n)
N=''
for i in range(s[:s+1:-1]):
    a = n % (10**i)
    N.append(a)
al = sum(N)
if n%al == 0:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
n=int(input())
s=len(n)
N=''
for i in range(s[:s+1:-1]):
    a = n % (10**i)
    N.append(a)
al = sum(N)
if al%n == 0:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
n=int(input())
s=len(n)
N=''
for i in range(s[:s+1:-1]):
    a = n % (10**i)
    N.append(a)
al = sum(N)
if al%n == 0:
    print('Yes')
else:
    print('No')
Problem p03544 (python)

Fixed submission:
n=int(input())
s=[]
s.append(2)
s.append(1)
if n==1:
    print('1')
    exit()
else:
    for i in range(2,87):
        k = s[i-2]+s[i-1]
        s.append(k)
        if i==n:
            print(s[i])
            exit()

Buggy submission (verdict: Runtime Error):
n=int(input())
s=[]
s.append(2)
s.append(1)
if n==0:
    print('2')
    exit()
elif n==1:
    print('1')
    exit()
else:
    for i in range(2,86):
        k = s[i-2]+s[i-1]
        s.apend(k)
        if i==n-1:
            print(s[i])
            exit()

Buggy submission (verdict: Runtime Error):
 n=input()
s=[]
s.append(2)
s.append(1)
if n==0:
    print('2')
    exit()
elif n==1:
    print('1')
    exit()
else:
    for i in range(2,86):
        k = s[i-2]+s[i-1]
        s.apend(k)
        if i==n-1:
            print(s[i])
            exit()

Buggy submission (verdict: Runtime Error):
n=input()
s=[]
s[0]=2
s[1]=1
for i in range(2,86):
    s[i] = s[i-2]+s[i-1]
    if i==n-1:
        print(s[i])
        exit()
Problem p03556 (python)

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

Buggy submission (verdict: Runtime Error):
n=int(input())
k=0
for i in range((n+1)/2):
    while (i+1)**2 < n:
        k+=1
print((k+1)**2)

Buggy submission (verdict: Runtime Error):
import math
 
n=int(input())
k=0
for i in range(math.sqrt(n)):
    while (i+1)**2 < n:
        k+=1
print((k+1)**2)
Problem p03564 (python)

Fixed submission:
n=int(input())
k=int(input())
dis = 1
for i in range(n):
    if dis*2 <= dis+k:
        dis *= 2
    else:
        dis += k
print(dis)

Buggy submission (verdict: Runtime Error):

n,k=map(int,input().split())
dis = 1
for i in range(n):
    if dis*2 <= dis+k:
        dis *= 2
    else:
        dis += k
print(dis)
Problem p03597 (python)

Fixed submission:
a=int(input())
b=int(input())
print(a*a-b)

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

Fixed submission:
N=int(input())
ans=0
for i in range(N):
	l,r=map(int,input().split())
	ans+=r-l+1
print(ans)

Buggy submission (verdict: Runtime Error):
n=int(input())
kei=0
for i in range(n):
    l,r=map(int,input().split())
kei += sum(r)-sum(l)
kei += n
print(kei)

Buggy submission (verdict: Runtime Error):
n=int(input())
kei=0
for i in range(n):
    l,r=map(int,input().split())
    kei += sum(r)-sum(l)
kei += n
print(kei)

Buggy submission (verdict: Runtime Error):
n=int(input())
l,r=list(map(int,input().split()))
kei=0
for i in range(n):
    kei += (r[i]-l[i]) + 1
print(kei)

Buggy submission (verdict: Runtime Error):
N=int(input())
ans=0
for i in range(N):
l,r=map(int,input().split())
ans+=r-l+1
print(ans)
Problem p03636 (python)

Fixed submission:
t=input()
a,*b,c=t
print(a+str(len(b))+c)

Buggy submission (verdict: Runtime Error):
t=input()
a,*b,c=t
print(a+int(len(b))+c)

Buggy submission (verdict: Runtime Error):
t=input()
a,*b,c=t
print(a+len(b)+c)

Buggy submission (verdict: Runtime Error):
t=input()
a,*b,c=t
print(a+len(*b)+c)

Buggy submission (verdict: Runtime Error):
t=input()
a,*b,c=t
print("a",len(*b),"c")
Problem p03658 (python)

Fixed submission:
n,k=map(int,input().split())
l=list(map(int,input().split()))
l.sort()
al=sum(l)
for i in range(n-k):
    al -= l[i]
print(al)

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
l=list(map(int,input().split()))
l.sort()
for i in range(n-k):
    al = sum(l)-l[i]
print(al)

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
l=list(map(int,input().split()))
l.sort()
al = sum(l)-l[:n-k]
print(al)

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
for i in range(n):
    l = [input()]
l.sort()
al = sum(l)-l[:n-k]
print(al)
Problem p03694 (python)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
a.sort()
print(a[n-1]-a[0])

Buggy submission (verdict: Runtime Error):
n=int(input())
for i in range(n):
    a=list(map(int,input().split()))
a.sort()
print(a[n-1]-a[0])
Problem p03712 (python)

Fixed submission:
h,w=map(int,input().split())
print('#'*(w+2))
for i in range(h):    
    print('#'+input()+'#')
print('#'*(w+2))

Buggy submission (verdict: Runtime Error):
print('#'*(w+2))
for i in range(h):    
    print('#'+input()+'#')
print('#'*(w+2))

Buggy submission (verdict: Runtime Error):
h,w=map(int,input().split())
for i in range(h):
    for j in range(w):
        a=list(input())

print('#'*(w+2))
for i in range(h):
    for j in range(w):      
        print('#'+a[i][j]+'#')
print('#'*(w+2))
Problem p03720 (python)

Fixed submission:
n,m=map(int,input().split())
A=[]
B=[]
for i in range(m):
    a,b=map(int,input().split())
    A.append(a)
    B.append(b)
for j in range(n):
    print(A.count(j+1)+B.count(j+1))

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
a=[]
b=[]
for i in range(m):
    a.append(input())
    b.append(input())
for j in range(n):
    print(a.count(j+1)+b.count(j+1))

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
a=[]
b=[]
for i in range(m):
    a.append(input())
    b.append(input())
for j in range(n):
    print(a.count(j)+b.count(j))
Problem p03760 (python)

Fixed submission:
o=input()
e=input()
O=len(o)
E=len(e)
a=[]
if O==E:
    for i in range(O):
        a.append(o[i]+e[i])
    b=''.join(a)
    print(b)
else:
    for i in range(E):
        a.append(o[i]+e[i])
    a.append(o[O-1])
    b=''.join(a)
    print(b)

Buggy submission (verdict: Runtime Error):
o=input()
e=input()
a=[]
for i in range(max(len(o),len(e))):
    a.append(o[i]+e[i])
b=''.join(a)
print(b)
Problem p03777 (python)

Fixed submission:
a,b=input().split()
print("H"if(a==b) else"D")

Buggy submission (verdict: Runtime Error):
a,b=map(input().split())
if(a =='H' and b=='H') or (a =='D' and b=='D'):
    print('H')
else:
    print('D')

Buggy submission (verdict: Runtime Error):
a,b=input()
print("H"if(a==b) else"D")
Problem p03795 (python)

Fixed submission:
n = int(input())
k = int(n/15)
x = 800*n
y = 200*k
print(x-y)

Buggy submission (verdict: Runtime Error):
n = int,input()
k = int(n/15)
x = 800*n - 200*k
print(x)

Buggy submission (verdict: Runtime Error):
n = int,input()
k = n/15
x = 800*n - 200*k
print(x)
Problem p03813 (python)

Fixed submission:
x = input()
x = int(x)
if x < 1200:
    print('ABC')
else:
    print("ARC")

Buggy submission (verdict: Runtime Error):
x = int,input()
if x < 1200:
    print('ABC')
else:
    print("ARC")
Problem p03845 (python)

Fixed submission:
n=int(input())
t=list(map(int,input().split()))
m=int(input())
for j in range(m):
    ans=0
    p,x=map(int,input().split())
    for k in range(n):
        if p==k+1:
            ans += x
        else:
            ans += t[k]
    print(ans)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=[]
for i in range(n):
    t=int(input())
    a.append(t)
m=int(input())
for j in range(m):
    p,x=map(int,input().split())
    for k in range(n):
        if t==k+1:
            a[k]=x
for j in range(m):
    print(sum(a))
Problem p03860 (python)

Fixed submission:
print("A%sC"%input()[8])

Buggy submission (verdict: Runtime Error):
a,b,c=map(input.split())
print('A' + b.head+ 'C',sep="")
Problem p04044 (python)

Fixed submission:
n,l=map(int,input().split())
a=[]
for i in range(n):
    s=input()
    a.append(s)
a.sort()
print(''.join(a))

Buggy submission (verdict: Runtime Error):
n,l=map(int,input().split())
for i in range(n):
     list[i] = str(input())
newlist=list.sorted()
print(newlist,sep='')
Problem p03455 (python)

Fixed submission:
a,b = map(int,input().split())
ans = a*b
if ans%2 == 0:
    print("Even")
else:
    print("Odd")

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
print("Even" if a*b % == 0 else "Odd")
Problem p03494 (python)

Fixed submission:
input()
a = list(map(int,input().split()))
count = 0
while all(i % 2 == 0 for i in a):
    a = [i/2 for i in a]
    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
input()
a = list(map(int,input().split()))
while all(i % 2 == 0 for i in a)
    a = [i/2 for i in a]
    count += 1
print(count)