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

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

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
if c-a-b<=0:
	print("No")
else:
	p=(a*b)**(1/2)
	if 2*p<(c-a-b):
    	print("Yes")
    else:
    	print("No")

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
if c-a-b<=0:
	print("No")
else:
  	p=(a*b)**(1/2)
	if 2*p<(c-a-b):
    	print("Yes")
    else:
    	print("No")

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
if c-a-b<=0:
	print("No")
else:
	if 4*a*b<(c-a-b)**2:
    	print("Yes")
    else:
    	print("No")

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
if c-a-b<=0:
	print("No")
else:
	if 4*a*b<(c-a-b)**2:
    	print("Yes")
    else:
    	print("No")
Problem p02887 (python)

Fixed submission:
N = int(input())
S = input()
ans=0
for i in range(N-1):
  if(S[i] == S[i+1]):
    ans+=1
ans=N-ans
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
S = input()
ans=0
for i in range(N-1):
  if(S[i] == S[i+1]):
    ans++
ans=N-ans
print(ans)
Problem p02660 (python)

Fixed submission:
n = int(input())


def factorization(n):
    arr = []
    tmp = n 
    for i in range(2, int(n**0.5)+1):
        if tmp%i == 0:
            cnt = 0 
            while tmp%i == 0:
                cnt += 1
                tmp //= i
            arr.append([i, cnt])
    if tmp!=1:
        arr.append([tmp, 1]) # n is prime
    if arr == []: 
        arr.append([n, 1]) # n==1 only
    return arr 


p_list=factorization(n)


N=n
cnt=0
while N!=1:
    for i in range(len(p_list)):
        p=p_list[i][0]
        for e in range(1,p_list[i][1]+1):
            z=p**e
            if z > N:
                break
            else:
                if N%z==0:
                    N=N//z
                    cnt+=1
    N=1    
print(cnt)

Buggy submission (verdict: Runtime Error):
import math
import sympy as sy
n = int(input())
a = sy.factorint(n)
p_list=[]
for i in a:
    p_list.append(i)

p_list.append(n)

N=n
cnt=0
while N!=1:
    for p in p_list:
        for e in range(1,int(math.log2(n))+1):
            z=p**e
            if z > N:
                break
            else:
                if N%z==0:
                    N=N//z
                    cnt+=1
    N=1    
print(cnt)
Problem p02702 (python)

Fixed submission:
s = input()[::-1] # 入力文字列を逆順でsに格納

counts = [0] * 2019
counts[0] = 1

num, d = 0, 1

for char in s:
    num += int(char) * d
    num %= 2019
    d *= 10
    d%= 2019
    counts[num] += 1

ans = 0
for cnt in counts:
    ans += cnt * (cnt - 1) // 2

print(ans) # 答えの出力

Buggy submission (verdict: Runtime Error):
S = str(input())
"""
def solution(S):
    a = len(S)
    b = list(0 for j in range(4, a+1)
        for i in range(a-j+1)
            if int(S[i:i+j])%2019==0)
    print(len(b))
solution(S)
"""

S = str(input())

def solution(S):
    a = len(S)
    b = list(0 for j in range(4, a+1)
        for i in range(a-j+1)
            if int(S[i:i+j])%3==0 and int(S[i:i+j])%673==0)
    print(len(b))
solution(S)
Problem p02714 (python)

Fixed submission:

N=int(input())
S=input()

#(RGB)になる組み合わせをカウント
count= S.count("R")*S.count("G")*S.count("B")
count0=0

#条件を満たさないものを引いていく
for i in range(1,N-2 +1):
    for j in range(i+1,(N+i)//2 +1):
        k=2*j-i
        if S[k-1]!=S[i-1] and S[k-1]!=S[j-1] and S[i-1]!=S[j-1]:
            count0 += 1
print(count-count0)

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

def main(N,S):
    count=0
    for i in range(1,N-2 +1):
        for j in range(i+1, N-1 +1):
            for k in range(j+1, N +1):
                if j-i != k-j and S[i-1]!=S[j-1]!=S[k-1]!=S[i-1]:
                    count += 1
    print(count)

if __name__=='__main__':
    main(N,S)
    
    """
import itertools
N = int(input())
S = input()
out = S.count('R') * S.count('G') * S.count('B')

RGBs = list(itertools.permutations(['R', 'G', 'B'], 3))

for i in range(1, N-1):
  for j in range(i+1,N):
      for k in range(j+1,N+1):
          if (S[i], S[j], S[k]) in RGBs:
              out -= 1
print(out)
Problem p02727 (python)

Fixed submission:
X,Y,A,B,C = map(int,input().split())

p = sorted(list(map(int,input().split()))) #A
q = sorted(list(map(int,input().split()))) #B
r = sorted(list(map(int,input().split()))) #C

xlist = p[-X:] #X
ylist = q[-Y:] #Y

"""
def main(X,Y,xlist,ylist,r):
    for i in range(min(X,Y)):
        if xlist[i] < ylist[i] and min(xlist) < max(r):
            xlist.remove(min(xlist))
            xlist.append(r.pop())
            
        elif ylist[i] < xlist[i] and min(ylist) < max(r):
            ylist.remove(min(ylist))
            ylist.append(r.pop())
            
        elif min(xlist) >= max(r) and min(ylist) >= max(r):
            break
        else:
            continue
    
    print(sum(xlist + ylist))

main(X,Y,xlist,ylist,r)
"""
all_apples = sorted(xlist + ylist + r)
print(sum(all_apples[-(X+Y):]))

Buggy submission (verdict: Runtime Error):
X,Y,A,B,C = map(int,input().split())

p = sorted(list(map(int,input().split()))) #A
q = sorted(list(map(int,input().split()))) #B
r = sorted(list(map(int,input().split()))) #C

xlist = p[-X:] #X
ylist = q[-Y:] #Y


for i in range(min(X,Y)):
    if xlist[i] < ylist[i] and min(xlist) < max(r):
        xlist.remove(min(xlist))
        xlist.append(max(r))
        r.pop()
    elif ylist[i] < xlist[i] and min(ylist) < max(r):
        ylist.remove(min(xlist))
        ylist.append(max(r))
        r.pop()
    else:
        continue

print(sum(xlist)+sum(ylist))
Problem p02732 (python)

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
B = set(A)

from collections import Counter
cnt_A = Counter(A)

All = 0
cnt = 0
for a in B:
    cnt = cnt_A[a]
    All +=  cnt*(cnt-1)//2

for k in range(N):
    ans_k = 0
    cnt = cnt_A[A[k]]
    ans_k = cnt - 1
    Ans = All - ans_k
    print(Ans)

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

Al = 0
cnt = 0
def solution(N,A,B,Al,cnt):
  for a in B:
      cnt = A.count(a)
      Al +=  cnt*(cnt-1)//2

  for k in range(N):
      cnt = A.count(A[k])
      print(Al - cnt +1)
solution(N,A,B,Al,cnt):

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

All = 0
cnt = 0
def solution(N,A,B,All,cnt):
  for a in B:
      cnt = A.count(a)
      All +=  cnt*(cnt-1)//2

  for k in range(N):
      cnt = A.count(A[k])
      print(All - cnt +1)
solution(N,A,B,All,cnt):
Problem p02761 (python)

Fixed submission:
N, M = map(int,input().split())
s = []

for i in range(M):
    s.append(list(map(int,input().split())))

for num in range(1000):
    str_num = str(num)
    if len(str_num) != N:
        continue
    
    flag = True
    for i in range(M):
        keta = s[i][0]
        if str_num[keta - 1] != str(s[i][1]): 
            flag = False
    if flag:
        print(num)
        exit()

print(-1)

Buggy submission (verdict: Runtime Error):
from collections import Counter

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

sc = [[0,0] for _ in range(M)]
X = [0 for _ in range(N)]

for i in range(M):
    sc[i][0],sc[i][1] = map(int,input().split())
    
def get_unique_list(seq):
    seen = []
    return [x for x in seq if x not in seen and not seen.append(x)]

sc = get_unique_list(sc)

sc_0 = [0 for _ in range(len(sc))]
judge = True

for i in range(len(sc)):
    sc_0[i]= sc[i][0]

cnt_sc0 = Counter(sc_0)
for i in sc_0:
    if cnt_sc0[i]> 1:
        judge = False
        break

if judge==True:    
    for i in range(len(sc)):
        X[sc[i][0]-1] = sc[i][1]
    
    for i in range(len(X)):
        if X[i] >= 1:
            x = X[i:]
            break

if judge==True:
    if len(x)==N:
        print(int("".join(map(str,x))))
else:
    print(-1)

Buggy submission (verdict: Runtime Error):
from collections import Counter

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

sc = [[0,0] for _ in range(M)]
X = [0 for _ in range(N)]

for i in range(M):
    sc[i][0],sc[i][1] = map(int,input().split())
    
def get_unique_list(seq):
    seen = []
    return [x for x in seq if x not in seen and not seen.append(x)]

sc = get_unique_list(sc)



sc_0 = [0 for _ in range(len(sc))]
judge = True

for i in range(len(sc)):
    sc_0[i]= sc[i][0]

cnt_sc0 = Counter(sc_0)
for i in sc_0:
    if cnt_sc0[i]> 1:
        judge = False
        break
    
for i in range(len(sc)):
    X[sc[i][0]-1] = sc[i][1]

for i in range(len(X)):
    if X[i] >= 1:
        x = X[i:]
        break

if len(x)==N and judge==True:
    print(int("".join(map(str,x))))
else:
    print(-1)
Problem p02801 (python)

Fixed submission:
A = "abcdefghijklmnopqrstuvwxyz"
c = input()

print(A[A.index(c)+1])

Buggy submission (verdict: Runtime Error):
A = "abcdefghijklmnopqrstu"
c = input()

print(A[A.index(c)+1])
Problem p02802 (python)

Fixed submission:
n,m=map(int,input().split())

ps=[]
pena=[[0,False] for _ in range(n)]
for i in range(m):
    ps.append(input().split())
 
for i in range(m):
    if pena[int(ps[i][0])-1][1]==False and ps[i][1]=="WA":
        pena[int(ps[i][0])-1][0]+=1
    else:
        pena[int(ps[i][0])-1][1]=True
ans=0
for i in range(n):
    if pena[i][1]==True:
        ans+=pena[i][0]
        
t=[pena[i][1] for i in range(len(pena))]
print(t.count(True),ans)

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())

ps=[]
pena=[[0,False] for _ in range(n)]
for i in range(m):
    ps.append(input().split())
 
for i in range(m):
    if pena[int(ps[i][0])][1]==False and ps[i][1]=="WA":
        pena[int(ps[i][0])][0]+=1
    else:
        pena[int(ps[i][0])][1]=True

p=[pena[i][0] for i in range(len(pena))]
t=[pena[i][1] for i in range(len(pena))]
print(t.count(True),sum(p))
Problem p02898 (python)

Fixed submission:

n,k = map(int,input().split())

h = [int(x) for x in input().split()]
cnt=0
for i in range(n):
    if h[i] >= k:
        cnt+=1
print(cnt)

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

h = [int(x) for x in input().split()]
cnt=0
for i in n:
    if h[i] < k:
        cnt+=1
print(cnt)
Problem p02923 (python)

Fixed submission:
import sys
sys.setrecursionlimit(10**9)
n=int(input())
h=[int(x) for x in input().split()]

ans_list=[]

def A(i,n,h,ans_list):
    ans=0
    for j in range(i,n-1):
        if h[j]>=h[j+1]:
            ans+=1
            if j==n-2:
                ans_list.append(ans)
                break
        else:
            ans_list.append(ans)
            A(j+1,n,h,ans_list)
            break
        
if n==1:
    print(0)
else:
    A(0,n,h,ans_list)
    print(max(ans_list))

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

ans_list=[]

def A(i,n,h,ans_list):
    ans=0
    for j in range(i,n-1):
        if h[j]>=h[j+1]:
            ans+=1
            if j==n-2:
                ans_list.append(ans)
                break
        else:
            ans_list.append(ans)
            A(j+1,n,h,ans_list)
            break
        
if n==1:
    print(0)
else:
    A(0,n,h,ans_list)
    print(max(ans_list))

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

ans_list=[]

def A(i,n,h,ans_list):
    ans=0
    if n==1:
        ans_list.append(0)
    else:
        for j in range(i,n-1):
            if h[j]>=h[j+1]:
                ans+=1
                if j==n-2:
                    ans_list.append(ans)
                    break
            else:
                ans_list.append(ans)
                A(j+1,n,h,ans_list)
                break
        
A(0,n,h,ans_list)
print(max(ans_list))

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

ans_list=[]

def A(i,n,h,ans_list):
    ans=0
    if n==1:
        ans_list.append(0)
        
    for j in range(i,n-1):
        if h[j]>=h[j+1]:
            ans+=1
            if j==n-2:
                ans_list.append(ans)
                break
        else:
            ans_list.append(ans)
            A(j+1,n,h,ans_list)
            break
        
A(0,n,h,ans_list)
print(max(ans_list))

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

ans_list=[]

def A(i,n,h,ans_list):
    ans=0
    for j in range(i,n-1):
        if h[j]>=h[j+1]:
            ans+=1
            if j==n-2:
                ans_list.append(ans)
                break
        else:
            ans_list.append(ans)
            A(j+1,n,h,ans_list)
            break
        
A(0,n,h,ans_list)
print(max(ans_list))
Problem p02947 (python)

Fixed submission:
n=int(input())
s=[]
for i in range(n):
    s.append("".join(sorted(input())))

S=set(s)

from operator import mul
from functools import reduce

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

from collections import Counter

ans=0
l=Counter(s)
for x in S:
    a=l[x]
    if a<2:
        continue
    else:
        ans+=cmb(a,2)
print(ans)

Buggy submission (verdict: Runtime Error):
n=int(input())
s=[]
for i in range(n):
    s.append("".join(sorted(input())))

S=set(s)

import math

def cmb(n,r):
    return math.factorial(n) // (math.factorial(n-r)*math.factorial(r))


ans=0
for x in S:
    a=s.count(x)
    ans+=cmb(a,2)
print(ans)
Problem p02995 (python)

Fixed submission:
from fractions import gcd
a,b,c,d=map(int,input().split())

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

e=lcm(c,d)

i_max=b//c
j_max=b//d
k_max=b//e

i_min=a//c
if a%c==0:
    i_min-=1
j_min=a//d
if a%d==0:
    j_min-=1
k_min=a//e
if a%e==0:
    k_min-=1

i=i_max-i_min
j=j_max-j_min
k=k_max-k_min

print(b-a+1-(i+j-k))

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

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

i_max=b//c
j_max=b//d
k_max=b//lcm(c,d)

i_min=a//c
j_min=a//d
k_min=a//lcm(c,d)

i=i_max-i_min
j=j_max-j_min
k=k_max-k_min

print(b-a+1-(i+j-k))
Problem p03043 (python)

Fixed submission:
n,k=map(int,input().split())

x=0
ans=0

for i in range(1,n+1):
    score=i
    p=1/n
    while score<k:
        p*=0.5
        score*=2
    ans+=p
    

print(ans)

Buggy submission (verdict: Runtime Error):
import math
n,k=map(int,input().split())

x=0
ans=0
for i in range(1,n+1):
    if k/i<=1:
        x=0
    else:
        x=int(math.log2(k/i))+1
    ans+=(1/n)*(1/2)**x
print(ans)
Problem p03147 (python)

Fixed submission:
n=int(input())
h=[int(x) for x in input().split()]

h_state=[0]*n

def water(n,h,h_state):
    for i in range(n):
        if h_state[i]<h[i]:
            l=i
            break
        elif i==n-1 and h_state[i]<h[i]:
            l=i
        else:
            l=i+1
    
    for j in range(l,n):
        if h_state[j]==h[j]:
            r=j-1
            break
        else:
            r=j
    
    for k in range(l,r+1):
        h_state[k]+=1

cnt=0
while h_state != h:
    for i in range(n):
        if h_state[i]<h[i]:
            cnt+=1
            water(n,h,h_state)
            break
print(cnt)

Buggy submission (verdict: Runtime Error):
h_state=[0]*n

def water(n,h,h_state):
    for i in range(n):
        if h_state[i]<h[i]:
            l=i
            break
        elif i==n-1 and h_state[i]<h[i]:
            l=i
        else:
            l=i+1
    
    for j in range(l,n):
        if h_state[j]==h[j]:
            r=j-1
            break
        else:
            r=j
    
    for k in range(l,r+1):
        h_state[k]+=1

cnt=0
while h_state != h:
    for i in range(n):
        if h_state[i]<h[i]:
            cnt+=1
            water(n,h,h_state)
            break
print(cnt)
Problem p03324 (python)

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

if d==0:
    if n<100:
        print(n)
    else:
        print(101)
else:
    if n<100:
        print(100**d*n)
    else:
        print(100**d*101)

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

if d!=0:
    a=[100**d*i for i in range(1,100)]    
else:
    a=[i for i in range(1,100)]

print(a[n-1])

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

if d!=0:
    a=[100*d*i for i in range(1,100)]    
else:
    a=[i for i in range(1,100)]

print(a[n-1])
Problem p02640 (python)

Fixed submission:
X, Y = map(int, input().split())
ans = 'No'
for a in range(X + 1):
    b = X - a
    if 2 * a + 4 * b == Y:
        ans = 'Yes'
print(ans)

Buggy submission (verdict: Runtime Error):
X, Y = map(int, input().split())
ans = 'No'
for a in range(X + 1):
    b = X - a
    if 2 * a + 4 * b == Y:
    ans = 'Yes'
print(ans)
Problem p02687 (python)

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

Buggy submission (verdict: Runtime Error):
if S == "ARC":
    print("ABc")
else:
    print("ARC")
Problem p02730 (python)

Fixed submission:
sente=input()
n=len(sente)
nt=int((n-1)/2)
nb=int((n+3)/2)
#print(nt,nb)
#print(sente[nb:n])
if sente == sente[::-1]:
    if sente[0:nt] == sente[0:nt][::-1]:
        #print(sente[0:nt])
       
        if sente[nb-1:n]==sente[nb-1:n][::-1]:
            #print(sente[nb-1:n])

            print('Yes')
        else:
            print('No')
            
    else:
        print('No')
        
else:
    print('No')

Buggy submission (verdict: Runtime Error):
sente=input()
n=len(sente)
nt=int((n-1)/2)
nb=int((n+3)/2)
#print(nt,nb)
#print(sente[nb:n])
if sente == sente[::-1]:
    if sente[0:nt] == sente[0:nt][::-1]:
        #print(sente[0:nt])
       
        if sente[nb-1:n]==sente[nb-1:n][::-1]:
            #print(sente[nb-1:n])

            print('Yes')
    else:
        print('No')
        else:
            print('No')
else:
    print('No')
Problem p02742 (python)

Fixed submission:
import math
H, W = map(int, input().split())

if H == 1 or W == 1:
    print(1)
    quit()

ans = (math.ceil(W / 2) * math.ceil(H / 2)) + ((W // 2) * (H // 2))

print(ans)

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

if H == 1 or W == 1:
    print(1)
    quit()

ans = (math.ceil(W / 2) * math.ceil(H / 2)) + ((W // 2) * (H // 2))

print(ans)
Problem p02783 (python)

Fixed submission:
import math
H,A = map(int, input().split())
print(math.ceil(H/A))

Buggy submission (verdict: Runtime Error):
H,A = map(int, input().split())
print(math.ceil(H/A))
Problem p02995 (python)

Fixed submission:
import fractions
A, B, C, D = map(int, input().split())


def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)


A = A - 1

ans = B - (B // C) - (B // D) + (B // (lcm(C, D)))
p = (A - (A // C) - (A // D) + (A // (lcm(C, D))))

print(ans - p)

Buggy submission (verdict: Runtime Error):
import math
A, B, C, D = map(int, input().split())


def lcm(x, y):
    return (x * y) // math.gcd(x, y)


A = A - 1

ans = B - (B // C) - (B // D) + (B // (lcm(C, D)))
p = (A - (A // C) - (A // D) + (A // (lcm(C, D))))

print(ans - p)
Problem p03164 (python)

Fixed submission:
import numpy as np
N, W = map(int, input().split())

dp = np.full(N * 1001, W + 10000)
dp[0] = 0

for i in range(N):
    w, v = map(int, input().split())
    dp[v:] = np.minimum(dp[:-v] + w, dp[v:])

ans = np.max(np.where(dp <= W))
print(ans)

Buggy submission (verdict: Runtime Error):
import numpy as np
N, W = map(int, input().split())

dp = np.zeros(W + 1, int)

for i in range(N):
    w, v = map(int, input().split())
    np.maximum(dp[:-w] + v, dp[w:], out=dp[w:])

print(dp[-1])
Problem p03759 (python)

Fixed submission:
a, b, c = map(int, input().split())
print("YES" if b - a == c - b else "NO")

Buggy submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
print("YES" if b - a=c - b else "NO")
Problem p03059 (python)

Fixed submission:
a,b,t = map(int,input().split())
n = t // a
print(n*b)

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

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

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

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

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

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

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

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

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

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

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

Buggy submission (verdict: Runtime Error):
n = int(input())
cnt == 0
for i in range(n):
    c = list(input())
    v = list(input())
    if int(c[i]) > int(v[i]):
        cnt += (int(c[i]) - int(v[i]))
print(cnt)
Problem p03071 (python)

Fixed submission:
A, B = map(int,input().split())
if A > B:
    print(int(A) + int(A) - 1)
elif B > A:
    print(int(B) + int(B) - 1)
else:
    print(int(A) + int(A))

Buggy submission (verdict: Runtime Error):
A,B = map(int,input().split())
if A > B:
    print(int(A) + int(A) - 1)
elif B > A:
    print(int(B) + int(B) - 1)
else A = B:
    print(int(A) + int(A))

Buggy submission (verdict: Runtime Error):
A,B = map(int,input().split())
if A > B:
    print(A*2 - 1)
elif B > A:
    print(B*2 - 1)
else A = B:
    print(A*2)

Buggy submission (verdict: Runtime Error):
A,B = map(int,input().split())
if A > B:
    print(A*2 - 1)
elif B > A:
    print(B*2 - 1)
else A == B:
    print(A*2)

Buggy submission (verdict: Runtime Error):
A,B = map(int,input().split())
if A > B:
    print(A*2 - 1)
elif B > A:
    print(B*2 - 1)
else A == B:
    print(A*2)
Problem p03085 (python)

Fixed submission:
b = input('')
if b == 'A':
    print('T')
elif b == 'C':
    print('G')
elif b == 'G':
    print('C')
else:
    print('A')

Buggy submission (verdict: Runtime Error):
b = input()
if b == A:
    print(T)
elif b == C:
    print(G)
elif b == G:
    print(C)
else:
    print(A)

Buggy submission (verdict: Runtime Error):
b = input('')
if b = 'A':
    print('T')
elif b = 'C':
    print('G')
elif b = 'G':
    print('C')
else:
    print('A')

Buggy submission (verdict: Runtime Error):
b = input()
if b = A:
    print(T)
elif b = C:
    print(G)
elif b = G:
    print(C)
else:
    print(A)