Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
R,G,B,N=map(int,input().split())

#R*r+G*g+B*b==n
ir= int(N/R)+1
ig=int(N/G)+1
ib=int(N/B)+1
s=0
for r in range(ir):
    for g in range(ig):
        if(R*r+G*g>N):
            break;
        if((N-R*r-G*g)%B==0):
            s+=1
print(s)


Fixed submission:
R,G,B,N=map(int,input().split())

#R*r+G*g+B*b==n
ir=int(N/R)+1
ig=int(N/G)+1
ib=int(N/B)+1
s=0
for r in range(ir):
    for g in range(ig):
        if(R*r+G*g>N):
            break;
        if((N-R*r-G*g)%B==0):
            s+=1
print(s)

Buggy python submission (verdict: Runtime Error):
R,G,B,N=map(int,input().split())

#R*r+G*g+B*b==n
ir= int(R/N)
ig=int(G/N)
ib=int(B/N)
s=0
for R in range(ir):
    for G in range(ig):
        if(R*r+G*g>N):
            break;
        if((N-R*r-G*g)%B==0):
            s+=1
print(s)


Fixed submission:
R,G,B,N=map(int,input().split())

#R*r+G*g+B*b==n
ir=int(N/R)+1
ig=int(N/G)+1
ib=int(N/B)+1
s=0
for r in range(ir):
    for g in range(ig):
        if(R*r+G*g>N):
            break;
        if((N-R*r-G*g)%B==0):
            s+=1
print(s)

Buggy python submission (verdict: Time Limit Exceeded):
R,G,B,N=map(int,input().split())
 
cnt =0
 
# R*r + G*g + B*b == N
 
rm =int(N/R)
gm =int(N/G)
bm = int(N/B)
 
for r in range(rm+1):
    for g in range(gm+1):
        if R*r + G*g > N :
                break
        for b in range(bm+1):
            if R*r + G*g + B*b > N :
                break
            if R*r + G*g + B*b == N :
                cnt +=1
print(cnt)

Fixed submission:
R,G,B,N=map(int,input().split())

#R*r+G*g+B*b==n
ir=int(N/R)+1
ig=int(N/G)+1
ib=int(N/B)+1
s=0
for r in range(ir):
    for g in range(ig):
        if(R*r+G*g>N):
            break;
        if((N-R*r-G*g)%B==0):
            s+=1
print(s)

Buggy python submission (verdict: Time Limit Exceeded):
R,G,B,N=map(int,input().split())

cnt =0

# R*r + G*g + B*b == N

rm =int(N/R)
gm =int(N/G)
bm = int(N/B)

for r in range(rm+1):
    for g in range(gm+1):
        if R*r + G*g > N :
                break
        for b in range(bm+1):
            if R*r + G*g + B*b > N :
                break
            if R*r + G*g + B*b == N :
                cnt +=1
print(cnt)



Fixed submission:
R,G,B,N=map(int,input().split())

#R*r+G*g+B*b==n
ir=int(N/R)+1
ig=int(N/G)+1
ib=int(N/B)+1
s=0
for r in range(ir):
    for g in range(ig):
        if(R*r+G*g>N):
            break;
        if((N-R*r-G*g)%B==0):
            s+=1
print(s)
Buggy python submission (verdict: Runtime Error):
from sys import exit
import math
from fractions import gcd

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

N,M=map(int,input().split())
S=input()
T=input()
if S[0] != T[0]:
    print("-1")
    exit()
if N<M:
    N,M=M,N
    S,T=T,S
    

# N>M S>T
if(N%M==0):
    S2=""
    for i in range(N):
        if i%(N//M)==0 :
            S2+=S[i]
            
    if S2==T:
        print(N)
    else:
        print(-1)
    exit()

else:
    print(lcm(n,m))

Fixed submission:
from sys import exit
import math
from fractions import gcd

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

N,M=map(int,input().split())
S=input()
T=input()
if S[0] != T[0]:
    print("-1")
    exit()
if N==M:
    if S==T:
        print(N)

    else:
        print(-1)
    exit()
    
if N<M:
    N,M=M,N
    S,T=T,S
    

# N>M S>T
if(N%M==0):
    S2=""
    for i in range(N):
        if i%(N//M)==0 :
            S2+=S[i]
            
    if S2==T:
        print(N)
    else:
        print(-1)
    exit()

else:
    g=gcd(N,M)
    S2=""
    for i in range(N):
        if i%(N//g)==0 :
            S2+=S[i]
    T2=""
    for i in range(M):
        if i%(M//g)==0 :
            T2+=T[i]
    if S2==T2:
        print(lcm(N,M))
    else:
        print(-1)

Buggy python submission (verdict: Runtime Error):
from sys import exit
import fractions
n,m=map(int,input().split())
s=input()
t=input()


print((m*n)//gcd)


Fixed submission:
from sys import exit
import math
from fractions import gcd

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

N,M=map(int,input().split())
S=input()
T=input()
if S[0] != T[0]:
    print("-1")
    exit()
if N==M:
    if S==T:
        print(N)

    else:
        print(-1)
    exit()
    
if N<M:
    N,M=M,N
    S,T=T,S
    

# N>M S>T
if(N%M==0):
    S2=""
    for i in range(N):
        if i%(N//M)==0 :
            S2+=S[i]
            
    if S2==T:
        print(N)
    else:
        print(-1)
    exit()

else:
    g=gcd(N,M)
    S2=""
    for i in range(N):
        if i%(N//g)==0 :
            S2+=S[i]
    T2=""
    for i in range(M):
        if i%(M//g)==0 :
            T2+=T[i]
    if S2==T2:
        print(lcm(N,M))
    else:
        print(-1)
Buggy python submission (verdict: Runtime Error):
3
apple
orange
apple
1
grape

Fixed submission:
ifhesay={}
def say(word,add):
	if word in ifhesay:
		ifhesay[word]+=add
	else:
		ifhesay[word]=add

n=int(input())

for i in range(n):
	say(input(),1)

m=int(input())

for i in range(m):
	say(input(),-1)

max=0

for k in ifhesay:
	v=ifhesay[k]
	if v>max:
		max=v
print(max)
Buggy python submission (verdict: Runtime Error):
x=int(input())
y=int(input())
z=int(input())

i=0
while (x-a-b*i)>=0:
	i+=1
i-=1
print(x-a-b*i)

Fixed submission:
x=int(input())
a=int(input())
b=int(input())

i=0
while (x-a-b*i)>=0:
	i+=1
i-=1
print(x-a-b*i)
Buggy python submission (verdict: Runtime Error):
import sys
n=int(input())
a=[]
f=[]
has2=False
for i in range(n):
  ai=int(input())
  if ai==2:
    has2=True
  a.append(ai)
  f.append(False)

if has2==False:
  print("-1")
  sys.exit()

f[0]=True
now=0
cnt=0
while True:
  if f[now]==True:
    print(-1)
    break
  if now==2:
    print(cnt)
    break
  f[now]=True
  now=a[now]
  cnt++

Fixed submission:
import sys
n=int(input())
a=[]
f=[]
has2=False
for i in range(n):
  ai=int(input())-1
  if ai==1:
    has2=True
  a.append(ai)
  f.append(False)

if has2==False:
  print("-1")
  sys.exit()

now=0
cnt=0
while True:
  
  if f[now]==True:
    print(-1)
    sys.exit()
  if now==1:
    print(cnt)
    sys.exit()
  f[now]=True
  now=a[now]
  cnt+=1
Buggy python submission (verdict: Runtime Error):
a = [int(j) for i in range(3) for j in input().split(' ')]
n = int(input())
nn = [int(input()) for i in range(n)]

for ni in nn:
  if ni in a:
    a[a.index(ni)] = 0

judge = Yes
if a[4]!=0 and a[2]!=0 and a[6]!=0:
  judge = No
  
print(judge)

Fixed submission:
n = int(input())
print(int(n/2)+n%2)
Buggy python submission (verdict: Runtime Error):
60 88 34
92 41 43
65 73 48
10
60
43
88
11
48
73
65
41
92
34

Fixed submission:
a = [int(j) for i in range(3) for j in input().split(' ')]
n = int(input())
nn = [int(input()) for i in range(n)]

cnt = 0
for ni in nn:
  if ni in a:
    cnt += 1
    a[a.index(ni)] = 0

judge = "No"
for i in range(3):
  if sum(a[i::3])==0 or sum(a[i*3:i*3+3])==0:
    judge = "Yes"
    
if sum(a[::4])==0 or (a[2]+a[4]+a[6])==0:
  judge = "Yes"
  
print(judge)
Buggy python submission (verdict: Runtime Error):
a, b, x = [int(i) for i in input().split()]
for i in range(1,10):
  n = (x-b*i)/float(a)
  if n<0:
    if i==9:
      print(0)
    continue
  if len(str(int(n)))==i:
    print(int(n)-1)
    break
  elif i==9:
    print(10**9)

Fixed submission:
s = str(input())
lst = ["SUN","MON","TUE","WED","THU","FRI","SAT"]

print(7-int(lst.index(s)))

Buggy python submission (verdict: Runtime Error):
a, b, x = [int(i) for i in input().split()]
for i in range(1,10):
  n = (x-b*i)/float(a)
  if n<0:
    if i==9:
      print(0)
    continue
  if len(str(int(n)))==i:
    print(int(n)+1)
    break
  elif i==9:
    print(10**9)

Fixed submission:
s = str(input())
lst = ["SUN","MON","TUE","WED","THU","FRI","SAT"]

print(7-int(lst.index(s)))

Buggy python submission (verdict: Runtime Error):
a, b, x = [int(i) for i in input().split()]
for i in range(1,10):
  n = (x-b*i)/float(a)
  if n<0:
    if i==9:
      print(0)
    continue
  if len(str(int(n)))==i:
    print(int(n))
    break
  elif i==9:
    print(10**9)

Fixed submission:
s = str(input())
lst = ["SUN","MON","TUE","WED","THU","FRI","SAT"]

print(7-int(lst.index(s)))
Buggy python submission (verdict: Runtime Error):
n = int(input())
s = str(input()).split()
alpha_lst = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split()

tmp = [alpha_lst[(int(alpha_lst.index(i))+n)%26] for i in s]

print(''.join(tmp))

Fixed submission:
n = int(input())
s = [i for i in str(input())]
alpha_lst = [i for i in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ']

tmp = [alpha_lst[(int(alpha_lst.index(i))+n)%26] for i in s]
#tmp = [alpha_lst.index(i) for i in s]
print(''.join(tmp))

Buggy python submission (verdict: Runtime Error):
n = int(input())
s = str(input()).split()
alpha_lst = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split()

tmp = [alpha_lst[(alpha_lst.index(i)+n)%26] for i in s]

print(''.join(tmp))

Fixed submission:
n = int(input())
s = [i for i in str(input())]
alpha_lst = [i for i in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ']

tmp = [alpha_lst[(int(alpha_lst.index(i))+n)%26] for i in s]
#tmp = [alpha_lst.index(i) for i in s]
print(''.join(tmp))
Buggy python submission (verdict: Runtime Error):
aaaa = input()
A = [int(x) for x in input().split()]


for i in range(len(A)-1):
  s1 = sum(A[:i+1])
  s2 = sum(A[i+1:])
  if s1 >= s2:
    print(abs(s1-s2))
    break

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

print(sum(sorted(A)[:-1]))

Buggy python submission (verdict: Runtime Error):
aaaa = input()
A = [int(x) for x in input().split()]


for i in range(len(A)):
  s1 = sum(A[:i+1])
  s2 = sum(A[i+1:])
  if s1 >= s2:
    print(s1-s2)
    break

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

print(sum(sorted(A)[:-1]))
Buggy python submission (verdict: Time Limit Exceeded):
n, m = (int(i) for i in input().split())
e = [[int(i) for i in input().split()] for i in range(m)] 
e = [list(range(i[0],i[1]+1)) for i in e]

x = set(e[0])
for i in e:
  x = x & set(i)
  
print(len(list(x)))

Fixed submission:
n, m = (int(i) for i in input().split())
e = [[int(i) for i in input().split()] for i in range(m)] 

start, end = e[0][0], e[0][1]
for i in e: 
  if start < i[0]:
    start = i[0]
  if end > i[1]:
    end = i[1]
  if start > end:
    break

if start > end:
  print(0)
else:
  print(end-start+1)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = input()

dic = {}
for s_i in s:
	dic[s_i] = s.count(s_i)+1

p = 10**9+7
res = 1
for v in dic.values():
	res = (res*v)%p

print((res-1)%p)

Fixed submission:
n = int(input())
s = input()

dic = {}
for s_i in set(s):
	dic[s_i] = s.count(s_i)+1

p = 10**9+7
res = 1
for v in dic.values():
	res = (res*v)%p

print(res-1)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = input()

dic = {}
for s_i in s:
	dic[s_i] = s.count(s_i)+1

res = 1
for v in dic.values():
	res = res*v

p = 10**9+7
print((res-1)%p)

Fixed submission:
n = int(input())
s = input()

dic = {}
for s_i in set(s):
	dic[s_i] = s.count(s_i)+1

p = 10**9+7
res = 1
for v in dic.values():
	res = (res*v)%p

print(res-1)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = str(input())

lst = ['0','']
for idx in range(n-1):
	org = lst
	tmp = []
	for org_i in org:
		tmp.append(org_i+str(idx+1))
	lst.extend(tmp)
lst.remove('')

cnt = 0
for lst_i in lst:
	tmp = []
	for str_i in lst_i:
		tmp.append(s[int(str_i)])
	if len(tmp) == len(list(set(tmp))):
		cnt += 1

print(cnt)

Fixed submission:
n = int(input())
s = input()

dic = {}
for s_i in set(s):
	dic[s_i] = s.count(s_i)+1

p = 10**9+7
res = 1
for v in dic.values():
	res = (res*v)%p

print(res-1)
Buggy python submission (verdict: Runtime Error):
n = int(input())
sumv = 0
for idx in n:
  v, u = str(input()).split(' ')
  if u == 'JPY':
    sumv += float(int(v))
  elif u == 'BTC':
    sumv += float(v) * 380000.0
print(sumv)

Fixed submission:
n = int(input())
sumv = 0
for idx in range(n):
  v, u = str(input()).split(' ')
  if u == 'JPY':
    sumv += float(int(v))
  elif u == 'BTC':
    sumv += float(v) * 380000.0
print(sumv)
Buggy python submission (verdict: Runtime Error):
n = int(input())
lst = str(input()).split(' ')

p1 = [0]*(max([int(i) for i in lst])+1)
p2 = [0]*(max([int(i) for i in lst])+1)
for idx in range(n):
	if idx%2 == 0:
		p1[int(lst[idx])] += 1
	else:
		p2[int(lst[idx])] += 1

pp1 = p1.index(max(p1))
pp2 = p2.index(max(p2))
if pp1 == pp2:
	if max(p1) >= max(p2):
		pp1 = p1.index(max(p1))
		pp2 = p2.index(sorted(p2)[-2])
	elif max(p2) > max(p1):
		pp1 = p1.index(sorted(p1)[-2])
		pp2 = p2.index(max(p2))

cnt1 = 0
cnt2 = 0
for idx in range(n):
	if idx%2 == 0:
		if not lst[idx] == str(pp1):
			cnt1 += 1
	else:
		if not lst[idx] == str(pp2):
			cnt2 += 1

print(cnt1 + cnt2)

Fixed submission:
n = str(input())
one_idx = []
nine_idx = []
for idx in range(len(n)):
	if n[idx]=='1':
		one_idx.append(idx)
	if n[idx]=='9':
		nine_idx.append(idx)

out = ''
for idx in range(len(n)):
	if idx in one_idx:
		out += '9'
	if idx in nine_idx:
		out += '1'
          
print(out)

Buggy python submission (verdict: Runtime Error):
n = int(input())
lst = str(input()).split(' ')

p1 = lst[0]
p2 = lst[1]
new_lst = []
for idx in range(n):
	if idx%2 == 0:
  		new_lst.append(p1)
	else:
		new_lst.append(p2)

cnt = 0
for o, l in zip(lst, new_lst):
	if not o == l:
		cnt +=1
if p1 == p2:
  print(int(n/2))
else:
  print(cnt)

Fixed submission:
n = str(input())
one_idx = []
nine_idx = []
for idx in range(len(n)):
	if n[idx]=='1':
		one_idx.append(idx)
	if n[idx]=='9':
		nine_idx.append(idx)

out = ''
for idx in range(len(n)):
	if idx in one_idx:
		out += '9'
	if idx in nine_idx:
		out += '1'
          
print(out)

Buggy python submission (verdict: Runtime Error):
n = str(input())
one_idx = []
nine_idx = []
for idx in range(n):
	if n[idx]=='1':
		one_idx.append(idx)
    if n[idx]=='9':
		nine_idx.append(idx)

for idx in range(n):
	if idx in one_idx:
		n[idx] = '9'
    if idx in nine_idx:
		n[idx] = '1'
          
print(n)


Fixed submission:
n = str(input())
one_idx = []
nine_idx = []
for idx in range(len(n)):
	if n[idx]=='1':
		one_idx.append(idx)
	if n[idx]=='9':
		nine_idx.append(idx)

out = ''
for idx in range(len(n)):
	if idx in one_idx:
		out += '9'
	if idx in nine_idx:
		out += '1'
          
print(out)
Buggy python submission (verdict: Runtime Error):
def canbuy(n):
    for i in range(int(100/7)):
        tmp = (n-7*i)
        if tmp==0 or (tmp>3 and tmp%4==0):
            return 'Yes'
    return 'No'

n=int(input())
print(canbuy(n))


Fixed submission:
def diff(n,k):
    if n%k==0:
        return 0
    else:
        return 1

n,k=[int(i) for i in input().split()]
print(diff(n,k))
Buggy python submission (verdict: Runtime Error):
def canbuy(n):
    for i in range(int(100/7)):
        if (n-7*i)>3 and (n-7*i)%4==0:
            return 'Yes'
    return 'No'

n=input()
print(canbuy(n))


Fixed submission:
def canbuy(n):
    for i in range(int(100/7)):
        tmp = n-7*i
        if tmp==0 or (tmp>3 and tmp%4==0):
            return 'Yes'
    return 'No'

n=int(input())
print(canbuy(n))

Buggy python submission (verdict: Runtime Error):
def canbuy(n):
    for i in range(int(100/7)):
        if (n-7*i)%4 == 0:
            return 'Yes'
    return 'No'

n=input()
print(canbuy(n))


Fixed submission:
def canbuy(n):
    for i in range(int(100/7)):
        tmp = n-7*i
        if tmp==0 or (tmp>3 and tmp%4==0):
            return 'Yes'
    return 'No'

n=int(input())
print(canbuy(n))

Buggy python submission (verdict: Runtime Error):
def canbuy(n):
    if n%7==0 or n%4==0:
        return 'Yes'
    else:
        if n<4:
            return 'No'
        else:
            if canbuy(n-7)=='Yes':
                return 'Yes'
            else:
                if canbuy(n-4)=='Yes':
                    return 'Yes'
                else:
                    return 'No'

n=input()
print(canbuy(n))


Fixed submission:
def canbuy(n):
    for i in range(int(100/7)):
        tmp = n-7*i
        if tmp==0 or (tmp>3 and tmp%4==0):
            return 'Yes'
    return 'No'

n=int(input())
print(canbuy(n))
Buggy python submission (verdict: Runtime Error):
i = input()
list1 = i.split()
tmpA = list1[0]
list1[0] = list1[1]
list1[1] = tmpA

tmpA = list1[0]
list1[0] = list1[2]
list1[2] = tmpA
print(list1[0] + " " + list1[1] + " " + list1[2]

Fixed submission:
i = input()
list1 = i.split()
tmpA = list1[0]
list1[0] = list1[1]
list1[1] = tmpA

tmpA = list1[0]
list1[0] = list1[2]
list1[2] = tmpA
print(list1[0] + " " + list1[1] + " " + list1[2])
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a - b == 0 or 1 or -1:
    print(a + b)
else:
    if a > b:
        print(a + a -1)
    else:
        print(b + b -1

Fixed submission:
a,b=map(int,input().split())
if abs(a - b) <= 1:
    print(a + b)
else:
    if a > b:
        print(a + a -1)
    else:
        print(b + b -1)
Buggy python submission (verdict: Runtime Error):
n=int(input())
h_list=[int(i) for i in input().split()]
b = 1  # counter
c = 1  # answer
m = h_list[0]  # max height
while b != (n - 1):
    if h_list[b] > m:
        c += 1
    b += 1
print(c)

Fixed submission:
n=int(input())
h_list=[int(i) for i in input().split()]
b = 1  # counter
c = 1  # answer
m = h_list[0]  # max height
while b != n:
    if h_list[b] >= m:
        m = h_list[b]
        c += 1
    b += 1
print(c)
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python

a, b, c = map(int, input().split())

if a == b:
    print(c)
elif b == c:
    print(a)
elif c == a:
    print(b)
else
    pass

Fixed submission:
#!/usr/bin/env python

a, b, c = map(int, input().split())

if a == b:
    print(c)
elif b == c:
    print(a)
elif c == a:
    print(b)
else:
    pass
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3

N = int(input())
a = list(map(int, input().split()))

print(max(a) - min(a))

Fixed submission:
#!/usr/bin/env python3

r, g, b = map(int, input().split())
num = (100 * r) + (10 * g) + (1 * b)

if num % 4 == 0:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3

a = [ int(input()) for i in range(int(input())) ]

print(max(a)-min(a))


Fixed submission:
#!/usr/bin/env python3
 
N = int(input())
a = list(map(int, input().split()))
 
print(max(a) - min(a))
Buggy python submission (verdict: Runtime Error):
import math
 
def check(x):
    k = 0
    global h, a, b
    for i in h:
        if x * b < i:
            k += math.ceil((i - x * b) / (a - b))
    return k <= x
 
 
n, a, b = map(int, input().split())
h = []
for i in range(n):
    h.append(int(input()))
l = -1
r = max(h) // b + 1
while r - l > 1:
    m = (l + r) // 2
    if check(m):
        r = m
    else:
        l = m
print(r)

Fixed submission:
#!/usr/bin/env python3

x = input().split()

A = int(x[0])
B = int(x[1])

if (A+B) < 10:
    print(A+B)
else:
    print("error")
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3

s = input()
N = int(s.split()[0])
A = int(s.split()[1])
B = int(s.split()[2])

h = []
for i in range(N):
    h.append(int(input()))

i = 0
while True:
    h.sort()
    if h[-1] <= 0:
        print(i)
        break
    else:
        i += 1
        h[-1] -= (A-B)
        for j in range(len(h)):
            h[j] -= B

Fixed submission:
import math
 
def check(x):
    k = 0
    global h, a, b
    for i in h:
        if x * b < i:
            k += math.ceil((i - x * b) / (a - b))
    return k <= x
 
 
n, a, b = map(int, input().split())
h = []
for i in range(n):
    h.append(int(input()))
l = -1
r = max(h) // b + 1
while r - l > 1:
    m = (l + r) // 2
    if check(m):
        r = m
    else:
        l = m
print(r)
Buggy python submission (verdict: Runtime Error):
a=input().split()
b=input().split()
h=input().split()

ans=((a + b) * h) / 2

print(ans)

Fixed submission:
x = [input() for i in range(3)]

a = int(x[0])
b = int(x[1])
h = int(x[2])

y=((a + b) * h) / 2
ans=int(y)
print(ans)
Buggy python submission (verdict: Runtime Error):
n, m = map(int,input().split())

print((n*(n-1))/2 + ((m*(m-1))/2)

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

print(int((n*(n-1))/2 + ((m*(m-1))/2)))

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

print((n*(n-1))/2 + ((m*(m-1))/2)

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

print(int((n*(n-1))/2 + ((m*(m-1))/2)))
Buggy python submission (verdict: Time Limit Exceeded):
#At coder 2020/2/9 B

# 入力
N = int(input())
A = list(map(int, input().split())) 

ans='YES'
for ii in range(N-1):
    for jj in range(ii+1,N):
        if A[ii]==A[jj]:
            ans='NO'
            break


print(ans)

Fixed submission:
#At coder 2020/2/9 B

# 入力
N = int(input())
A = list(map(int, input().split())) 

if len(A)-len(set(A))==0:
    ans='YES'
else:
    ans='NO'
#ans='YES'
#for ii in range(N-1):
#    for jj in range(ii+1,N):
#        if A[ii]==A[jj]:
#            ans='NO'
#            break
#    if ans=='NO':
#        break


print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
#At coder 2020/2/9 B

# 入力
N = int(input())
A = list(map(int, input().split())) 

ans='YES'
for ii in range(N-1):
    for jj in range(ii+1,N):
        if A[ii]==A[jj]:
            ans='NO'
            break
    if ans=='NO':
        break


print(ans)

Fixed submission:
#At coder 2020/2/9 B

# 入力
N = int(input())
A = list(map(int, input().split())) 

if len(A)-len(set(A))==0:
    ans='YES'
else:
    ans='NO'
#ans='YES'
#for ii in range(N-1):
#    for jj in range(ii+1,N):
#        if A[ii]==A[jj]:
#            ans='NO'
#            break
#    if ans=='NO':
#        break


print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
#At coder 2020/2/9 B

# 入力
N = int(input())
A = list(map(int, input().split())) 

ans='YES'
for ii in range(N-1):
    for jj in range(ii+1,N):
        if A[ii]==A[jj]:
            ans='NO'

print(ans)

Fixed submission:
#At coder 2020/2/9 B

# 入力
N = int(input())
A = list(map(int, input().split())) 

if len(A)-len(set(A))==0:
    ans='YES'
else:
    ans='NO'
#ans='YES'
#for ii in range(N-1):
#    for jj in range(ii+1,N):
#        if A[ii]==A[jj]:
#            ans='NO'
#            break
#    if ans=='NO':
#        break


print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import sys
a = [int(i) for i in input().split()]
N = a[0]
K = a[1]

if K == 1:
    print(0)
    sys.exit()


def resZ(i, K):
    return abs(i - K)


while True:
    ab = resZ(N, K)
    # print(ab)
    if N < ab:
        print(N)
        # print('end')
        sys.exit()

    N = ab
# def


Fixed submission:
import sys
a = [int(i) for i in input().split()]
N = a[0]
K = a[1]

if K == 1:
    print(0)
    sys.exit()


def resZ(i, K):
    return abs(i - K)

ab = resZ(N, K)
# print(ab)
if N < ab:
    print(N)
    # print('end')
    sys.exit()

N = N % K
while True:
    ab = resZ(N, K)
    # print(ab)
    if N < ab:
        print(N)
        # print('end')
        sys.exit()

    N = ab
# def
Buggy python submission (verdict: Runtime Error):
a = [int(i) for i in input().split()]
if a[0] == a[1]:
  print('Yes')
else
  print('No')
  

Fixed submission:
a = [int(i) for i in input().split()]
if a[0] == a[1]:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
import sys

if sys.platform =='ios':
	sys.stdin=open('input_file.txt')
	
#+++++
import math
a,b = map(int, input().split())
#n = int(input().strip())
#s,t=input().split(' ')
ans = a*b//math.gcd(a,b)
print(ans)


Fixed submission:
import sys

if sys.platform =='ios':
	sys.stdin=open('input_file.txt')
	
#+++++
import fractions
a,b = map(int, input().split())
#n = int(input().strip())
#s,t=input().split(' ')
ans = a*b//fractions.gcd(a,b)
print(ans)
Buggy python submission (verdict: Runtime Error):
import math

N = int(input())
K = int(input())
mod = N % K
  
if(abs(mod-K) < mod)
  mod = abs(mod-K);
  
print(mod)


Fixed submission:
import math
 
N, K = map(int, input().split())
mod = N % K
  
if abs(mod-K) < mod:
  mod = abs(mod-K)
  
print(mod)
Buggy python submission (verdict: Runtime Error):
import sys
a, b, c = map(int, sys.argv[1:])
b2 = a
c2 = b
a2 = c
print(a2, b2, c2)


Fixed submission:
in_ = input()
a, b, c = map(int, in_.split())
b2 = a
c2 = b
a2 = c
print(a2, b2, c2)

Buggy python submission (verdict: Runtime Error):
a, b, c = input
b2 = a
c2 = b
a2 = c
print(a2, b2, c2)


Fixed submission:
in_ = input()
a, b, c = map(int, in_.split())
b2 = a
c2 = b
a2 = c
print(a2, b2, c2)