Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import numpy as np
a = int(input())
b = np.array(list(map(int, input().split())))
b = np.prod(b)
if b > 10**18:
    print('-1')
else:print(c)


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

if 0 in a:
    print(0)
    exit()

mult = 1

for i in a:
    mult *= i
    if mult > 10**18:
        print(-1)
        exit()
print(mult)

Buggy python submission (verdict: Runtime Error):
import numpy as np
a = int(input())
b = np.array(list(map(int, input().split())))
b = np.prod(b)
if b > 10**18:
    print('-1')
else:print(c)


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

if 0 in a:
    print(0)
    exit()

mult = 1

for i in a:
    mult *= i
    if mult > 10**18:
        print(-1)
        exit()
print(mult)

Buggy python submission (verdict: Runtime Error):
import numpy as np
a = int(input())
b = np.array(list(map(int, input().split())))
b = np.prod(b)
if c > 10**18:
    print('-1')
else:print(c)


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

if 0 in a:
    print(0)
    exit()

mult = 1

for i in a:
    mult *= i
    if mult > 10**18:
        print(-1)
        exit()
print(mult)

Buggy python submission (verdict: Time Limit Exceeded):
a = int(input())
b = list(map(int, input().split()))
c = 1
for i in b:
    c *= i
if c > 10**18:
    print('-1')
else:print(c)

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

if 0 in a:
    print(0)
    exit()

mult = 1

for i in a:
    mult *= i
    if mult > 10**18:
        print(-1)
        exit()
print(mult)

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = list(map(int, input().split()))
c = 1
for i in b:
    c *= i
if c > 10**18
    print('-1')
print(c)

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

if 0 in a:
    print(0)
    exit()

mult = 1

for i in a:
    mult *= i
    if mult > 10**18:
        print(-1)
        exit()
print(mult)
Buggy python submission (verdict: Runtime Error):
a, b, c, k = map(int, input().split())

num_list = [1] * a + [0] * b + [-1] * c

count = sum(num_list[:k])
print(count)

Fixed submission:
a, b, c, k = map(int, input().split())

count = 0
if a < k:
    count += a
    if a+b < k:
        count -= k-a-b
else:
    count = k

print(count)
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
h = list(map(int, input().split()))

good = 0

obs = [[] for i in range(n) ]

for i in range(m):
    a, b = map(int, input().split())
    obs[a-1].append(b)
    obs[b-1].append(a)

    higher = True
    if len(o) == 0:
        good += 1
        continue
    o = set(o)
    for i in o:
        if h[idx] <= h[i-1]:
            higher = False
    if higher:
        good += 1

print(good)


Fixed submission:

n, m = map(int, input().split())
h = list(map(int, input().split()))

good = 0

obs = [[] for i in range(n) ]

for i in range(m):
    a, b = map(int, input().split())
    obs[a-1].append(b)
    obs[b-1].append(a)

for idx,o in enumerate(obs):
    higher = True
    if len(o) == 0:
        good += 1
        continue
    o = set(o)
    for i in o:
        if h[idx] <= h[i-1]:
            higher = False
    if higher:
        good += 1

print(good)
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, raw_input().split())
print int(b/c)-int(a/c+0.999)+1

Fixed submission:
a, b, c = map(int, input().split())
print(int(b/c)-int(a/c+0.999)+1)

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
a, b, c = map(int, raw_input().split())
print(int(b/c)-int(a/c+0.999)+1)

Fixed submission:
a, b, c = map(int, input().split())
print(int(b/c)-int(a/c+0.999)+1)

Buggy python submission (verdict: Runtime Error):
input_line = raw_input()
a = []
for m in input_line.split(" "):
	a += [int(m)]
print(int(a[1]/a[2])-int(a[0]/a[2]+0.999)+1)

Fixed submission:
a, b, c = map(int, input().split())
print(int(b/c)-int(a/c+0.999)+1)

Buggy python submission (verdict: Runtime Error):
input_line = raw_input()
for m in input_line.split(" "):
	a += [int(m)]
print(int(a[1]/a[2])-int(a[0]/a[2]+0.999)+1)

Fixed submission:
a, b, c = map(int, input().split())
print(int(b/c)-int(a/c+0.999)+1)

Buggy python submission (verdict: Runtime Error):
input_line = input()
for m in input_line.split(" "):
	a += [int(m)]
print(int(a[1]/a[2])-int(a[0]/a[2]+0.999)+1)

Fixed submission:
a, b, c = map(int, input().split())
print(int(b/c)-int(a/c+0.999)+1)

Buggy python submission (verdict: Runtime Error):
a = input()
b = input()
c = input()
print(int(b/c)-int(a/c+0.999)+1)

Fixed submission:
a, b, c = map(int, input().split())
print(int(b/c)-int(a/c+0.999)+1)
Buggy python submission (verdict: Runtime Error):
n = int(input())
ret = [0 for _ in range(1,21)]
def f(x,y,z):
	return x*x + y*y + z*z + x*y + y*z + x*z

for x in range(1,n+1):
	for y in range(1,n+1):
		for z in range(1,n+1):
			if f(x,y,z) > n:
				z = 1
				break
			ret[f(x,y,z)-1] += 1
		if f(x,y,z) > n:
			y = 1
			break
	if f(x,y,z) > n:
		x = 1
		break

for i in ret:
	print(i)

Fixed submission:
n = int(input())
ret = [0 for _ in range(1,n+1)]
def f(x,y,z):
	return x*x + y*y + z*z + x*y + y*z + x*z

for x in range(1,n+1):
	for y in range(1,n+1):
		for z in range(1,n+1):
			if f(x,y,z) > n:
				z = 1
				break
			ret[f(x,y,z)-1] += 1
		if f(x,y,z) > n:
			y = 1
			break
	if f(x,y,z) > n:
		x = 1
		break

for i in ret:
	print(i)

Buggy python submission (verdict: Time Limit Exceeded):
import math
f = int(input())
for n in range(1,f+1):
	try:
		l = int(-1+math.sqrt(-2+n)+0.999)
	except:
		print(0)
		continue
	e = 0
	p = []
	for x in range(1,l+1):
		for y in range(1,x+1):
			try:
				q = (-(x+y)+math.sqrt((x+y)**2-4*(x**2+y**2+x*y-n)))/2
				if q==int(q) and q > 0 and (x+y+q) not in p:
					if q == x and q == y:
						e += 1
						p.append(x+y+q)
					else:
						e += 3
						p.append(x+y+q)
			except:
				pass
	print(e)

Fixed submission:
n = int(input())
ret = [0 for _ in range(1,n+1)]
def f(x,y,z):
	return x*x + y*y + z*z + x*y + y*z + x*z

for x in range(1,n+1):
	for y in range(1,n+1):
		for z in range(1,n+1):
			if f(x,y,z) > n:
				z = 1
				break
			ret[f(x,y,z)-1] += 1
		if f(x,y,z) > n:
			y = 1
			break
	if f(x,y,z) > n:
		x = 1
		break

for i in ret:
	print(i)

Buggy python submission (verdict: Time Limit Exceeded):
import math
n = int(input())
for f in range(1,n+1):
	try:
		l = int(-1+math.sqrt(-2+f)+0.999)
	except:
		print(0)
		continue
	e = 0
	for x in range(1,l+1):
		for y in range(1,l+1):
			try:
				q = (-(x+y)+math.sqrt((x+y)**2-4*(x**2+y**2+x*y-f)))/2
				if q==int(q) and q >= 1:
					e += 1
			except:
				pass
	print(e)

Fixed submission:
n = int(input())
ret = [0 for _ in range(1,n+1)]
def f(x,y,z):
	return x*x + y*y + z*z + x*y + y*z + x*z

for x in range(1,n+1):
	for y in range(1,n+1):
		for z in range(1,n+1):
			if f(x,y,z) > n:
				z = 1
				break
			ret[f(x,y,z)-1] += 1
		if f(x,y,z) > n:
			y = 1
			break
	if f(x,y,z) > n:
		x = 1
		break

for i in ret:
	print(i)
Buggy python submission (verdict: Runtime Error):
a = input()
b = ['SUN','MON','TUE','WED','THU','FRI','SAT']
ptint(7 - b.index(a))

Fixed submission:
a = input()
b = ['SUN','MON','TUE','WED','THU','FRI','SAT']
print(7 - b.index(a))
Buggy python submission (verdict: Runtime Error):
a,b,c,d = list(map(int,input().split()))
cou = 0
if a is b:
  cou = cou + 1
elif b is c:
   cou = cou + 1
elif c is d:
   cou = cou + 1
else:
  print("Good")
if cou > 0:
  print("Bad")


Fixed submission:
a = int(input())
b = a//1000
c = (a//100)%10
d = (a//10)%10
e = a%10
cou = 0
if b is c:
  cou = cou + 1
elif c is d:
   cou = cou + 1
elif d is e:
   cou = cou + 1
else:
  print("Good")
if cou > 0:
  print("Bad")

Buggy python submission (verdict: Runtime Error):
a,b,c,d = list(map(int,input().split()))
cou = 0
if a is b:
  cou +=1
elif b is c:
  cou +=1
elif c is d:
  cou +=1
else:
  print("Good")
if cou > 0:
  print("Bad")


Fixed submission:
a = int(input())
b = a//1000
c = (a//100)%10
d = (a//10)%10
e = a%10
cou = 0
if b is c:
  cou = cou + 1
elif c is d:
   cou = cou + 1
elif d is e:
   cou = cou + 1
else:
  print("Good")
if cou > 0:
  print("Bad")
Buggy python submission (verdict: Runtime Error):
a = int(input())
y = a//100
m = a%100
if y <= 12 and y >= 1:
	if m <= 12 and n >= 1:
    	print('AMBIGUOUS')
    else:
     	print('MMYY')
else:
	if m <= 12 and n >= 1:
    	print('YYMM')
    else:
     	print('NA')


Fixed submission:
a, b = map(int, input().split())
c = input()
print(c[:b-1]+str.lower(c[b-1])+c[b:])

Buggy python submission (verdict: Runtime Error):
def hantei(y,m):
    if y <= 12 and y >= 1:
        if m <= 12 and n >= 1:
            print('AMBIGUOUS')
        else:
            print('MMYY')
    else:
        if m <= 12 and n >= 1:
            print('YYMM')
        else:
            print('NA')
a = int(input())
b1 = a//100
c2 = a%100
henkan(b1,c2)


Fixed submission:
a, b = map(int, input().split())
c = input()
print(c[:b-1]+str.lower(c[b-1])+c[b:])

Buggy python submission (verdict: Runtime Error):
def hantei(y,m):
    if y <= 12 and y >= 1:
        if m <= 12 and n >= 1:
            print('AMBIGUOUS')
        else:
            print('MMYY')
    else:
        if m <= 12 and n >= 1:
            print('YYMM')
        else:
            print('NA')
a = input()
b1 = int(a[0:2])
c2 = int(a[2:4])
henkan(b1,c2)


Fixed submission:
a, b = map(int, input().split())
c = input()
print(c[:b-1]+str.lower(c[b-1])+c[b:])

Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
c = input()
c[b-1] += 32
print(c)

Fixed submission:
a, b = map(int, input().split())
c = input()
print(c[:b-1]+str.lower(c[b-1])+c[b:])
Buggy python submission (verdict: Runtime Error):
a = int(input())
y = a//100
m = a%100
if y <= 12 and y >= 1:
	if m <= 12 and n >= 1:
    	print('AMBIGUOUS')
    else:
     	print('MMYY')
else:
	if m <= 12 and n >= 1:
    	print('YYMM')
    else:
     	print('NA')


Fixed submission:
a = int(input())
y = a//100
m = a%100
if 1 <= y <= 12 and 1 <= m <= 12:
	print('AMBIGUOUS')
elif 1 <= y <= 12:
	print('MMYY')
elif 1 <= m <= 12:
	print('YYMM')
else:
	print('NA')

Buggy python submission (verdict: Runtime Error):
a = int(input())
y = a//100
m = a%100
if y <= 12 and y >= 1:
        if m <= 12 and n >= 1:
            print('AMBIGUOUS')
        else:
            print('MMYY')
    else:
        if m <= 12 and n >= 1:
            print('YYMM')
        else:
            print('NA')


Fixed submission:
a = int(input())
y = a//100
m = a%100
if 1 <= y <= 12 and 1 <= m <= 12:
	print('AMBIGUOUS')
elif 1 <= y <= 12:
	print('MMYY')
elif 1 <= m <= 12:
	print('YYMM')
else:
	print('NA')

Buggy python submission (verdict: Runtime Error):
def hantei(y,m):
    if y <= 12 and y >= 1:
        if m <= 12 and n >= 1:
            print('AMBIGUOUS')
        else:
            print('MMYY')
    else:
        if m <= 12 and n >= 1:
            print('YYMM')
        else:
            print('NA')
a = input()
b1 = int(a[0:2])
c2 = int(a[2:4])
henkan(b1,c2)


Fixed submission:
a = int(input())
y = a//100
m = a%100
if 1 <= y <= 12 and 1 <= m <= 12:
	print('AMBIGUOUS')
elif 1 <= y <= 12:
	print('MMYY')
elif 1 <= m <= 12:
	print('YYMM')
else:
	print('NA')

Buggy python submission (verdict: Runtime Error):
def hantei(y,m):
    if y <= 12 and y >= 1:
        if m <= 12 and n >= 1:
            print('AMBIGUOUS')
        else:
            print('YYMM')
    else:
        if m <= 12 and n >= 1:
            print('MMYY')
        else:
            print('NA')
a = input()
b1 = int(a[:2])
c2 = int(a[2:])
hantei(b1,c2)


Fixed submission:
a = int(input())
y = a//100
m = a%100
if 1 <= y <= 12 and 1 <= m <= 12:
	print('AMBIGUOUS')
elif 1 <= y <= 12:
	print('MMYY')
elif 1 <= m <= 12:
	print('YYMM')
else:
	print('NA')

Buggy python submission (verdict: Runtime Error):
def hantei(y,m):
    if str(y) == '00' or str(m) == '00':
        print('NA')
        if m > 12:
            print('YYMM')
        else:
            print('MMYY')
    else:
        print('AMBIGUOUS')


a = input()
b = 0
b1 = int(a[:2])
c2 = int(a[2:])
henkan(b1,c2)


Fixed submission:
a = int(input())
y = a//100
m = a%100
if 1 <= y <= 12 and 1 <= m <= 12:
	print('AMBIGUOUS')
elif 1 <= y <= 12:
	print('MMYY')
elif 1 <= m <= 12:
	print('YYMM')
else:
	print('NA')
Buggy python submission (verdict: Runtime Error):
a,b = map(int,input().split())
s = b
p = 0.0
for i in range(1,a+1):
	tmp = 1.0/a
	now = i
	while now < b:
		now = now*2
        tmp = tmp/2
	p = p+tmp
print(p)


Fixed submission:
a,b = map(int,input().split())
s = b
p = 0.0
for i in range(1,a+1):
	tmp = 1.0/a
	now = i
	while now < b:
		now = now*2
		tmp = tmp/2
	p = p+tmp
print(p)

Buggy python submission (verdict: Runtime Error):
a,b = map(int,input().split())
s = b
p = 0.0
for i in range(1,a+1):
	tmp = 1.0/a
	now = i
	while now < b:
		now = now*2
        tmp = tmp/2
	p = p+tmp
print(p)

Fixed submission:
a,b = map(int,input().split())
s = b
p = 0.0
for i in range(1,a+1):
	tmp = 1.0/a
	now = i
	while now < b:
		now = now*2
		tmp = tmp/2
	p = p+tmp
print(p)

Buggy python submission (verdict: Runtime Error):
a,b = map(int,input().split())
s = b
p = 0.0
for i in range(1,a+1):
	tmp = 1.0/a
	now = i
	while now < b:
		now = now*2
        tmp = tmp/2
	p = p+tmp
print(%.12f%p)


Fixed submission:
a,b = map(int,input().split())
s = b
p = 0.0
for i in range(1,a+1):
	tmp = 1.0/a
	now = i
	while now < b:
		now = now*2
		tmp = tmp/2
	p = p+tmp
print(p)

Buggy python submission (verdict: Runtime Error):
a,b = map(int,input().split())
s = b
p = 0.0
for i in range(1,a+1):
	tmp = 1.0/a
	now = i
	while now < b:
		now = now*2
        tmp = tmp/2
	p = p+tmp
print(%.12f%p)

  
  
  
  
  

Fixed submission:
a,b = map(int,input().split())
s = b
p = 0.0
for i in range(1,a+1):
	tmp = 1.0/a
	now = i
	while now < b:
		now = now*2
		tmp = tmp/2
	p = p+tmp
print(p)
Buggy python submission (verdict: Time Limit Exceeded):
r,g,b,n = map(int,input().split())
cnt = 0
for i in range(n // r + 1):
    for j in range(n // g + 1):
        c = n - i * r - j * g
        if c >= 0 and c % b == 0:
             cnt += 1
print(cnt)


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

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

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

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


Fixed submission:
r,g,b,n = map(int,input().split(" "))
cnt = 0
for i in range(n // r + 1):
    for j in range(n // g + 1):
        c = n - i * r - j * g
        if c < 0:
            break
        if c % b == 0:
             cnt += 1
print(cnt)
Buggy python submission (verdict: Runtime Error):
min = int(input())
max = int(input())+1
power = int(input())

count = 0
for i in range(min, max):
    if i % power == 0:
        count += 1

print(count)


Fixed submission:
param = input()
min, max, power = (param.split())

count = 0
for i in range(int(min), int(max)+1):
    if i % int(power) == 0:
        count += 1

print(count)
Buggy python submission (verdict: Runtime Error):
s = input()

if s in ['a-z']:
  print('a')
elif s in ['A-Z']:
  print('A')
else:


Fixed submission:
s = input()

if s.islower():
  print('a')
else:
  print('A')
Buggy python submission (verdict: Runtime Error):
n = int(input())
ans = ''
for i in range(1, 99):
  if N <= 26 ** i:
    N -= 1
    for j in range(i):
      ans += chr(ord('a') + N % 26)
      N //= 26
    break
  else:
    N -= 26 ** i
print(ans[::-1]) 

Fixed submission:
N = int(input())
ans = ''
for i in range(1, 99):
  if N <= 26 ** i:
    N -= 1
    for j in range(i):
      ans += chr(ord('a') + N % 26)
      N //= 26
    break
  else:
    N -= 26 ** i
print(ans[::-1])
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
arr = [0] * 100000
for val in a:
  arr[val] += 1
sums = sum(a)
q = int(input())
for _ in range(q):
  b, c = map(int,input().split())
  diff = (c-b) * (arr[b])
  sums += diff
  print(sums) 
  arr[c] += arr[b]
  arr[b] = 0

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
arr = [0] * 100005
for val in a:
  arr[val] += 1
sums = sum(a)
q = int(input())
for _ in range(q):
  b, c = map(int,input().split())
  diff = (c-b) * (arr[b])
  sums += diff
  print(sums) 
  arr[c] += arr[b]
  arr[b] = 0

Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
arr= [0] * 10**5
for val in a:
  arr[val]+=1
sums=sum(a)
q=int(input())
for _ in range(q):
  b,c=map(int,input().split())
  diff=(c-b)*(arr[b])
  sums+=diff
  print(sums) 
  arr[c]+=arr[b]
  arr[b]=0

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
arr = [0] * 100005
for val in a:
  arr[val] += 1
sums = sum(a)
q = int(input())
for _ in range(q):
  b, c = map(int,input().split())
  diff = (c-b) * (arr[b])
  sums += diff
  print(sums) 
  arr[c] += arr[b]
  arr[b] = 0

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int,input().split()))
q = int(input())
a_tmp = a

for i in range(q):
  b, c = map(int, input().split())
  a_tmp2 = [c if j == b else j for j in a_tmp]
  ans = sum(a_tmp2)
  a_tmp = a_tmp2
  print(ans)
  

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
arr = [0] * 100005
for val in a:
  arr[val] += 1
sums = sum(a)
q = int(input())
for _ in range(q):
  b, c = map(int,input().split())
  diff = (c-b) * (arr[b])
  sums += diff
  print(sums) 
  arr[c] += arr[b]
  arr[b] = 0
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input()) 
a = list(map(int, input().split()))
a2 = sorted(a)
ans = n
for i in range(len(a2)):
  for j in range(len(a2)):
    if i != j or i > j:
      if a2[i] % a2[j] == 0:
        ans -= 1
        break

print(ans)

Fixed submission:
import collections

n=int(input())
arr=list(map(int,input().split()))
arr=sorted(arr)
s=set()
cnt=collections.Counter(arr)

for i in range(n):
 if arr[i] in s:
   continue
 if cnt[arr[i]]>=2:
   s.add(arr[i])
 for j in range(2,10**6//arr[i]+1):
   s.add(arr[i]*j)
ans=0
for i in range(n):
 if arr[i] in s:
   continue
 ans+=1

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input()) 
a = list(map(int, input().split()))
ans = n
for i in range(len(a)):
  for j in range(len(a)):
    if i != j:
      if a[i] % a[j] == 0:
        ans -= 1
        break

print(ans)

Fixed submission:
import collections

n=int(input())
arr=list(map(int,input().split()))
arr=sorted(arr)
s=set()
cnt=collections.Counter(arr)

for i in range(n):
 if arr[i] in s:
   continue
 if cnt[arr[i]]>=2:
   s.add(arr[i])
 for j in range(2,10**6//arr[i]+1):
   s.add(arr[i]*j)
ans=0
for i in range(n):
 if arr[i] in s:
   continue
 ans+=1

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
a,b,c,d=map(int,input().split())
while(True):
    if (d<=0):
        ans="Yes"
    c=c-b
    if (d<=0):
        ans="Yes"
        break
    a=a-d
    if (b<=0):
        ans="No"
        break

print(ans)

##print("Yes" if   -(-d//a) <=-(-b//c)  else "No")

Fixed submission:
a,b,c,d=map(int,input().split())
"""
while(True):
    if (d<=0):
        ans="Yes"
    c=c-b
    if (d<=0):
        ans="Yes"
        break
    a=a-d
    if (b<=0):
        ans="No"
        break

print(ans)
"""
print("Yes" if   -(-c//b) <=-(-a//d)  else "No")
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
##s=[i for i in map(str,input().split())]
list=[]
for i in range(n):
    s=input()
    if(s not in list):
        list.append(s)

print(len(list))


Fixed submission:
n=int(input())
s=[input() for i in range(n)]

s.sort()
ans=1
for i in range(1,n):
    
    if s[i-1]==s[i]:
        ans=ans-1
    ans+=1

print(ans)
Buggy python submission (verdict: Runtime Error):
n,d=map(int,input().split())
print(-(-n//(2*d))

Fixed submission:
n,d=map(int,input().split())
print(-(-n//(2*d+1)))

Buggy python submission (verdict: Runtime Error):
n,d=map(int,input().split())
print(-(-n//2d))

Fixed submission:
n,d=map(int,input().split())
print(-(-n//(2*d+1)))
Buggy python submission (verdict: Runtime Error):
from math import gcd
def lcm( x, y):
    return (x*y)//gcd(x,y)
a,b,c,d=map(int,input().split())
C =b//c-a//c
D= b//d-a//d
EX=  lcm(c,d)
EX=b//EX-a//EX
print(b-a+1-(C+D)+EX)

Fixed submission:
def gcd(x,y):
    if x<y:
        x,y=y,x
    if y==0:
        return x
    c=x%y
    return gcd(y,c)   
def lcm( x, y):
    return (x*y)//gcd(x,y)
a,b,c,d=map(int,input().split())
C =b//c-(-(-a//c))
D= b//d-(-(-a//d))
EX=  lcm(c,d)
EX=b//EX+(-a//EX)
print(b-a-(C+D)+EX)

Buggy python submission (verdict: Runtime Error):
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<numeric>
#include<cmath>
#include<stdio.h>
//#include<array>

#define rep(i,n) for(int i=0;i<(n);i++)
#define LL long long int


using namespace std;

int main(void){
    LL a,b,c,d;
    cin >> a>>b>>c>>d;

    LL ans=0;
    

    LL C =b/c-a/c;
    LL D= b/d-a/d;
      /* 
    for(int i =a; i<b; i++){

        if(i%c!=0 && i%d!=0){
            ans++;
        }

    }*/
    /* vector<LL> lista(C);
    int h=0;
    for(LL i =a/c,h=0;i<b/c;h++,i++){
        lista[h]=i*a;
        cout<<lista[h]<< " " << h<< " " << i<< " " << i*a<<endl;
    }
    LL x;
  
    LL j=0;
    LL EX=0;
   for(LL i =a/d;i<b/d;i++){
        x=i*b;
         while(x>lista[j] )j++;
        cout<<x<< " " << lista[j]<< " " << h<< " " << j<<endl;
        if(lista[j]==x)EX++;
        if( h>j)break;

   }*/

    cout <<b-a+1-(C+D)<<endl;
    return 0;
}

Fixed submission:
def gcd(x,y):
    if x<y:
        x,y=y,x
    if y==0:
        return x
    c=x%y
    return gcd(y,c)   
def lcm( x, y):
    return (x*y)//gcd(x,y)
a,b,c,d=map(int,input().split())
C =b//c-(-(-a//c))
D= b//d-(-(-a//d))
EX=  lcm(c,d)
EX=b//EX+(-a//EX)
print(b-a-(C+D)+EX)

Buggy python submission (verdict: Runtime Error):
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<numeric>
#include<cmath>
#include<stdio.h>
//#include<array>

#define rep(i,n) for(int i=0;i<(n);i++)
#define LL long long int


using namespace std;

int main(void){
    LL a,b,c,d;
    cin >> a>>b>>c>>d;

    LL ans=0;
    /* 
    for(int i =a; i<b; i++){

        if(i%c!=0 && i%d!=0){
            ans++;
        }

    }*/

    LL C =b/c-a/c;
      LL D= b/d-a/d;
    /* vector<LL> lista(C);
    int h=0;
    for(LL i =a/c,h=0;i<b/c;h++,i++){
        lista[h]=i*a;
        cout<<lista[h]<< " " << h<< " " << i<< " " << i*a<<endl;
    }
    LL x;
  
    LL j=0;
    LL EX=0;
   for(LL i =a/d;i<b/d;i++){
        x=i*b;
         while(x>lista[j] )j++;
        cout<<x<< " " << lista[j]<< " " << h<< " " << j<<endl;
        if(lista[j]==x)EX++;
        if( h>j)break;

   }*/

    cout <<b-a+1-(C+D)<<endl;
    return 0;
}

Fixed submission:
def gcd(x,y):
    if x<y:
        x,y=y,x
    if y==0:
        return x
    c=x%y
    return gcd(y,c)   
def lcm( x, y):
    return (x*y)//gcd(x,y)
a,b,c,d=map(int,input().split())
C =b//c-(-(-a//c))
D= b//d-(-(-a//d))
EX=  lcm(c,d)
EX=b//EX+(-a//EX)
print(b-a-(C+D)+EX)
Buggy python submission (verdict: Runtime Error):
n=int(input())
v=list(map(int,input().split()))
c=list(map(int,input().split()))
x=[v[i]-c[i] for i in range(n)]
x.sort(reverse=True)
i=0
ans=0
while x[i]>0:
    ans+=x[i]
    i=i+1
print(ans)

Fixed submission:
n=int(input())
v=list(map(int,input().split()))
c=list(map(int,input().split()))
x=[v[i]-c[i] for i in range(n)]
x.sort(reverse=True)
i=0
ans=0
while x[i]>0 :
    ans+=x[i]
    i=i+1
    if i==n:
        break
print(ans)