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

Fixed submission:
s,t = map(str,input().split())
a,b = map(int,input().split())
u = str(input())

if u == s:
    a = a-1
else:
    b = b-1

print(a, b)

Buggy submission (verdict: Runtime Error):
a = int(input())
lis = list(map(int,input().split()))

ans = list(set(lis))

if len(lis) == len(ans):
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
a = int(input())
lis = list(map(int,input().split()))

ans = list(set(lis))

if a == len(ans):
    print("YES")
else:
    print("NO")
Problem p02659 (python)

Fixed submission:
import math
from decimal import Decimal

A = input().split()
answer = Decimal(A[0]) * Decimal(A[1])

print(math.floor(answer))

Buggy submission (verdict: Runtime Error):
import math
from decimal import Decimal


A, B = map(float, input().split())
answer = A * Decimal(B)

print(math.floor(answer))
Problem p02594 (python)

Fixed submission:
x=int(input())
if(x>=30):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
N,D=map(int,input().split())
ans=0

for i in  range(N):
    x,y=map(int,input().split())
    if(D*D>=x*x+y*y):ans+=1
    
    
print(ans)
Problem p02595 (python)

Fixed submission:
import math
N,D = [int(x) for x in input().split()]
count = 0
for i in range(0,N):
  X,Y = [int(x) for x in input().split()]
  if math.sqrt(X**2 + Y**2) <= D:
      count += 1
print(count)

Buggy submission (verdict: Runtime Error):
import math
N,D = [int(x) for x in input().split()]
count = 0
for i in range(D):
  X,Y = [int(x) for x in input().split()]
  if math.sqrt(X**2 + Y**2) <= D:
      count += 1
print(count)
Problem p02594 (python)

Fixed submission:
if int(input()) >= 30:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
if input() >= 30:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
if X >= 30:
    print('Yes')
else:
    print('No')
Problem p02688 (python)

Fixed submission:
def main():
  n, k = map(int, input().split())
  
  kids = list()
  sum = 0
  
  for i in range(k):
    dustbox = input()
    kids += list(map(int, input().split()))
    
  for i in range(1, n+1):
    if i not in kids:
      sum += 1
      
  print(sum)
  
main()

Buggy submission (verdict: Runtime Error):
def main():
  n, k = map(int, input().split())
  
  kids = list()
  sum = 0
  
  for i in k-1:
    dustbox = input()
    kids += list(map(int, input().split()))
    
  for i in range(1, n+1):
    if i not in kids:
      sum += 1
      
  print(sum)
  
main()

Buggy submission (verdict: Runtime Error):
def main():
  n, k = map(int, input().split())
  
  kids = list()
  sum = 0
  
  for i in k:
    dustbox = input()
    kids += list(map(int, input().split()))
    
  for i in range(1, n+1):
    if i not in kids:
      sum += 1
      
  print(sum)
  
main()
Problem p02707 (python)

Fixed submission:
def main():
  n = int(input())
  A = list(map(int, input().split()))
  
  num = [0] * n + [0]
  
  # for i in range(0, n-1):
  #   for k in range(0, len(A)):
  #     if A[k] == i+1:
  #       num[i] += 1
  
  for i in range(0, n-1):
    num[A[i]] += 1
  
  for k in range(1, n+1):    
    print(num[k])
  
main()

Buggy submission (verdict: Runtime Error):
def main():
  n = int(input())
  A = list(map(int, input().split()))
  
  num = [0] * n
  
  # for i in range(0, n-1):
  #   for k in range(0, len(A)):
  #     if A[k] == i+1:
  #       num[i] += 1
  
  for i in range(0, n-1):
    num[A[i]] += 1
  
  for k in range(1, n+1):    
    print(num[k])
  
main()
Problem p02773 (python)

Fixed submission:

import math
import collections

def main():
  N = int(input())
  S = list()
  S = [input() for _ in range(N)]
  
  s = collections.Counter(S)
  
  MaxCount = max(s.values())
  
  ans = []
  
  for key, value in s.items():
    if value == MaxCount:
      ans.append(key)
                 
  ans.sort()
  
  for i in ans:
    print(i)
  
  
  
  
main()

Buggy submission (verdict: Runtime Error):
import math
import collections

def main():
  N = int(input())
  S = list()
  S = [input() for _ in range(N)]
  
  s = collections.counter(S)
  
  MaxCount = max(s.values())
  
  ans = []
  
  for key, value in s.items():
    if value == MaxCount:
      ans.append(key)
                 
  ans.sort()
  
  for i in ans:
    print(ans[i])
  
  
  
  
main()
Problem p02685 (python)

Fixed submission:
import math

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

if N == 1:
    print(M)
    exit(0)

mod = 998244353

fac = [0] * N
finv = [0] * N
inv = [0] * N

fac[0] = fac[1] = 1
finv[0] = finv[1] = 1
inv[1] = 1
for i in range(2, N):
    fac[i] = fac[i - 1] * i % mod
    inv[i] = mod - inv[mod % i] * (mod // i) % mod
    finv[i] = finv[i - 1] * inv[i] % mod

def com(n, k):
    global fac, finv, mod
    if n < k:
        return 0
    if n < 0 or k < 0:
        return 0
    return fac[n] * (finv[k] * finv[n - k] % mod) % mod

ans = pow(M, N, mod)
for L in range(K + 1, N):
    result = (M * pow(M - 1, N - L - 1, mod) * com(N - 1, N - L - 1)) % mod
    ans -= result

print(ans % mod)

Buggy submission (verdict: Runtime Error):
import math

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

mod = 998244353

fac = [0] * N
finv = [0] * N
inv = [0] * N

fac[0] = fac[1] = 1
finv[0] = finv[1] = 1
inv[1] = 1
for i in range(2, N):
    fac[i] = fac[i - 1] * i % mod
    inv[i] = mod - inv[mod % i] * (mod // i) % mod
    finv[i] = finv[i - 1] * inv[i] % mod

def com(n, k):
    global fac, finv, mod
    if n < k:
        return 0
    if n < 0 or k < 0:
        return 0
    return fac[n] * (finv[k] * finv[n - k] % mod) % mod

ans = pow(M, N, mod)
for L in range(K + 1, N):
    result = (M * pow(M - 1, N - L - 1, mod) * com(N - 1, N - L - 1)) % mod
    ans -= result

print(ans % mod)
Problem p02793 (python)

Fixed submission:
# import math
# import fractions

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

mod = 10 ** 9 + 7


def prime_factorize(n):
    a = {}
    while n % 2 == 0:
        if 2 not in a:
          a[2] = 0
        a[2] += 1
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            if f not in a:
              a[f] = 0
            a[f] += 1
            n //= f
        else:
            f += 2
    if n != 1:
      if n not in a:
        a[n] = 0
      a[n] += 1
    return a


# 最小公倍数を素因数分解した形で持つ
l = prime_factorize(a[0])
# print(l)
# xs = {}
# xs[a[0]] = prime_factorize(a[0])
for i in range(1, n):
  ps = prime_factorize(a[i])
  # print(ps)
  # xs[a[i]] = ps
  for k, v in ps.items():
    if k in l:
      l[k] = max(v, l[k])
    else:
      l[k] = v

# print(l)
# print(xs)

L = 1
for k, v in l.items():
  L = L * pow(k, v, mod) % mod

answer = 0
for x in a:
  answer = (answer + L * pow(x, mod - 2, mod)) % mod
print(answer)

Buggy submission (verdict: Runtime Error):
import math

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

mod = 10 ** 9 + 7

lcm = a[0]
for i in range(1, n):
  lcm = lcm * a[i] // math.gcd(lcm, a[i])

answer = 0
for x in a:
  answer = (answer + lcm // x) % mod
print(answer)

Buggy submission (verdict: Runtime Error):
import math
from functools import reduce


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


def lcm(numbers):
    return reduce(lcm_base, numbers, 1)

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

l = lcm(a)
answer = 0
for aa in a:
    answer += l // aa
    answer = answer % (10 ** 9 + 7)

print(answer)
Problem p03265 (python)

Fixed submission:
x1, y1, x2, y2 = map(int, input().split(" "))
x = x2 - x1
y = y2 - y1
print(x2 - y, y2 + x, x1 - y, y1 + x)

Buggy submission (verdict: Runtime Error):
x1, y1, x2, y2 = map(int, input().split(" "))
a_2 = (x1 - x2) ** 2 + (y1 - y2) ** 2
x2dash = x2 - x1
y2dash = y2 - y1
x3, y3, x4, y4 = [None, None, None, None]

for x in range(-250, 250):
	for y in range(-250, 250):
		first = (x2dash - x) ** 2 + (y2dash - y) ** 2
		second = x ** 2 + y ** 2
		if first == a_2 and second == 2 * a_2:
			if x2dash >= 0 and y2dash >= 0:
				if x <= x2dash and y >= y2dash:
					x3, y3 = [x, y]
					break
			elif x2dash >= 0 and y2dash <= 0:
				if x >= x2dash and y >= y2dash:
					x3, y3 = [x, y]
					break
			elif x2dash <= 0 and y2dash <= 0:
				if x >= x2dash and y <= y2dash:
					x3, y3 = [x, y]
					break
			else:
				if x <= x2dash and y <= y2dash:
					x3, y3 = [x, y]
					break

for x in range(-250, 250):
	for y in range(-250, 250):
		first = x ** 2 + y ** 2
		second = (x3 - x) ** 2 + (y3 - y) ** 2
		if first == a_2 and second == a_2 and x != x2dash and y != y2dash:
			x4, y4 = [x, y]
			break

print(x3 + x1, y3 + y1, x4 + x1, y4 + y1)
Problem p02819 (python)

Fixed submission:
x = int(input())
while any(x % i == 0 for i in range(2,x)):
    x += 1
print(x)

Buggy submission (verdict: Runtime Error):


import math
x_sq = math.sqrt(x)
x_sq_it = int(x_sq)

pnlist = [2]

countn = 0
for i in range(3,x_sq_it+1):
    for j in range(len(pnlist)):
        if i % pnlist[j] == 0:
            break
        else:
            countn += 1
    if countn == len(pnlist):
        pnlist.append(i)
        countn = 0
# print(pnlist)

countn = 0
for i in range(x,10**5):
    for j in range(len(pnlist)):
        if i % pnlist[j] == 0:
            break
        else:
            countn += 1
    if countn == len(pnlist):
        print(i)
        exit()
    else:
        countn = 0
Problem p02916 (python)

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

b_sum = sum(b)

c_sum = 0
for i in range(n-1):
    if a[i] != n:
        if a[i] + 1 == a[i+1]:
            c_sum += c[a[i]-1]

print(b_sum + c_sum)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split(" ")))
b = list(map(int, input().split(" ")))
c = list(map(int, input().split(" ")))

b_sum = sum(b)

c_sum = 0
for i in range(n-1):
    if a[i] != n:
        if a[i] + 1 == a[i+1]:
            c_sum += c[ai-1]

print(b_sum + c_sum)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split(" ")))
b = list(map(int, input().split(" ")))
c = list(map(int, input().split(" ")))

b_sum = sum(b)

c_sum = 0
for i in range(n-1):
    if a[i] != n and a[i] + 1 == a[i+1]:
        c_sum += c[ai-1]

print(b_sum + c_sum)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = map(int, input().split(" "))
b = map(int, input().split(" "))
c = map(int, input().split(" "))

b_sum = sum(b)

c_sum = 0
for i in range(n-1):
    ai = a[i]
    if ai != n:
        c_sum += c[ai-1]

print(b_sum + c_sum)
Problem p02935 (python)

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

v.sort()
# print(v)
w = []

w0 = (v[0] + v[1])/2
w.append(w0)

for i in range(1,n-1):
    y = (v[i+1] + w[i-1])/2
    w.append(y)
    # print(w)
# print(w)
print(w[n-2])

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

plsl = []
plsn = 0
for i in range(n-1):
    if h[i]>= h[i+1] and i == n-2:
        plsn += 1
        # print(plsn)
        plsl.append(plsn)
        # print(plsl)
    elif h[i]>= h[i+1] and i =< n-1:
        plsn += 1
        # print(plsn)
    else:
        plsl.append(plsn)
        # print(plsl)
        plsn = 0
        # print(plsn)
plsl.sort(reverse = True)
print(plsl[0])

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

plsl = []
plsn = 0
for i in range(n-1):
    if h[i]>= h[i+1] and i == n-1:
        plsn += 1
        # print(plsn)
        plsl.append(plsn)
        # print(plsl)
    elif h[i]>= h[i+1] and i < n-1:
        plsn += 1
        # print(plsn)
    else:
        plsl.append(plsn)
        # print(plsl)
        plsn = 0
        # print(plsn)
plsl.sort(reverse = True)
print(plsl[0])
Problem p02987 (python)

Fixed submission:
s = input()
s_list = list(s)
s_list.sort()

if s_list[0] == s_list[1] and s_list[2] == s_list[3] and s_list[0] != s_list[2]:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
s = int(input())

if s[0] == s[1]:
    if s[2] == s[3]:
        print("Yes")
    else:
        print("No")

if s[0] == s[2]:
    if s[1] == s[3]:
        print("Yes")
    else:
        print("No")

if s[0] == s[3]:
    if s[2] == s[1]:
        print("Yes")
    else:
        print("No")

Buggy submission (verdict: Runtime Error):
s = int(input())
sorted(s)

if s[0] == s[1] and s[2] == s[3]:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
for i in range(1,4):
    if s[0] == s[i]:
        for j in range(2,4):
            if s[1] == s[j]
    else:
        print("No") 
        exit()
print("Yes")

Buggy submission (verdict: Runtime Error):
s = int(input())

for i in range(1,4):
    if s[0] == s[i]:
        for j in range(2,4):
            if s[1] == s[j]
    else:
        print("No") 
        exit()
    print("Yes")
Problem p03011 (python)

Fixed submission:
o = input()
o_list = o.split(" ")

p = int(o_list[0])
q = int(o_list[1])
r = int(o_list[2])
pq = p + q
qr = q + r
rp = r + p

if pq <= qr and pq <= rp:
    print(pq)
elif qr <= rp and qr <= pq:
    print(qr)
elif rp <= pq and rp <= qr:
    print(rp)

Buggy submission (verdict: Runtime Error):
o_list = o.split(" ")
o_list_i = [int(s) for s in o_list]
o_list_i.sort()

o0 = int(o_list_i[0])
o1 = int(o_list_i[1])
print( o0 + o1 )
Problem p03075 (python)

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

i = e-a

if i <= k:
    print("Yay!")
else:
    print(":(")

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if (e-a) =< k:
    print("Yay!")
else:
    print(":(")
Problem p02723 (python)

Fixed submission:
s = input()
a = list(s)
if a[2] == a[3] and a[4] == a[5]:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
s = input().split()
a = list(s)
if a[2] == a[3] and a[4] == a[5]:
    print("Yes")
else:
    print("No")
Problem p02711 (python)

Fixed submission:
n = input()
if n.count('7') == 0:
    print('No')
else:
    print('Yes')

Buggy submission (verdict: Runtime Error):
n = input()
if n.count() == 0:
    print('No')
else:
    print('Yes')
Problem p02785 (python)

Fixed submission:
# coding: utf-8
n, k = map(int, input().split())
h = list(map(int, input().split()))
h.sort()
if n <= k:
    print(0)
else:
    print(sum(h[0: n - k]))

Buggy submission (verdict: Runtime Error):
# coding: utf-8
n, k = map(int, input().split())
h = list(map(int, input().split()))
h.sort()
if n =< k:
    print(n)
else:
    print(sum(h[0: n - k]) + k)
Problem p02622 (python)

Fixed submission:
s=input()
t=input()
a=0
for i in range(len(s)):
    if s[i]!=t[i]:
        a += 1
print(a)

Buggy submission (verdict: Runtime Error):
s=input()
t=input()
a=0
for i in len(s):
  if s[i]=!t[i]:
    a +=
print(a)

Buggy submission (verdict: Runtime Error):
s=input()
t=input()
a=0
for i in len(s):
  if s[i]=!t[i]:
  a +=
print(a)
Problem p02712 (python)

Fixed submission:
N=int(input())
F=N//3
B=N//5
fb=N//15
S=(N*(N+1))//2
Fizz=(3*F*(F+1))//2
Buzz=(5*B*(B+1))//2
FizzBuzz=(15*fb*(fb+1))//2
print(S-Fizz-Buzz+FizzBuzz)

Buggy submission (verdict: Runtime Error):
¥N=int(input())
F=N//3
B=N//5
fb=N//15
S=(N*(N+1))//2
Fizz=(3*F*(F+1))//2
Buzz=(5*B*(B+1))//2
FizzBuzz=(15*fb*(fb+1))//2
print(S-Fizz-Buzz+FizzBuzz)
Problem p02594 (python)

Fixed submission:
a = int(input())
if a>=30:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a = int(input())
if a>=30:
  print("Yes")
else
  print("No")
Problem p02594 (python)

Fixed submission:
if int(input()) >= 30:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
if input() => 30:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
if input() >=30:
    print("Yes")
else:
    print("No")
Problem p02754 (python)

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

Buggy submission (verdict: Runtime Error):
N,A,B=map(int,input().split())
ball=('b'*A+'r'*B)*10**7
if B <= N:
    print(ball.count('b',0,N))
else:
    print(N)

Buggy submission (verdict: Runtime Error):
N,A,B=map(int,input().split())
ball=('b'*A+'r'*B)*N
print(ball[0:N].count('b'))

Buggy submission (verdict: Runtime Error):
N,A,B=map(int,input().split())
c='b'*A+'a'*B
import math
for i in range(math.ceil(N/(A+B))+1):
    d=i*c
print(d.count('b',0,N))

Buggy submission (verdict: Runtime Error):
N,A,B=map(int,input().split())
c='b'*A+'a'*B
for i in range(N):
    d=i*c
print(d.count('b',0,N))

Buggy submission (verdict: Runtime Error):
N,A,B=map(int,input().split())
c=N//(A+B)
ball=('b'*A+'a'*B)*(c+1)
print(ball.count('b',0,N))

Buggy submission (verdict: Runtime Error):
N,A,B=map(int,input().split())
import math
c=math.ceil(N/(A+B))
ball=('b'*A+'a'*B)*c
print(ball.count('b',0,N))

Buggy submission (verdict: Runtime Error):
N,A,B=map(int,input().split())
import math
c=math.ceil(N/(A+B))
ball=('b'*A+'a'*B)*c
print(ball.count('b',0,N))

Buggy submission (verdict: Runtime Error):
N,A,B=map(int,input().split())
ball=('b'*A+'a'*B)*10**18
print(ball.count('b',0,N))

Buggy submission (verdict: Runtime Error):
N,A,B=map(int,input().split())
ball=('b'*A+'a'*B)*10**18
print(ball.count('b',0,N))

Buggy submission (verdict: Runtime Error):
N,A,B=map(int,input().split())
ball=('b'*A+'a'*B)*10**9
print(ball.count('b',0,N))

Buggy submission (verdict: Runtime Error):
N,A,B=map(int,input().split())
ball=('b'*A+'a'*B)*10**7
print(ball.count('b',0,N))

Buggy submission (verdict: Runtime Error):
N,A,B=map(int,input().split())
ball=('b'*A+'a'*B)*100
print(ball.count('b',0,N))

Buggy submission (verdict: Runtime Error):
N,A,B=map(int,input().split())
ball=('b'*A+'a'*B)*100
print(ball[0:N].count('b'))

Buggy submission (verdict: Runtime Error):
N,A,B=map(int,input().split())
ball=('b'*A+'a'*B)*10
print(ball[0:N].count('b'))

Buggy submission (verdict: Runtime Error):
N,A,B=map(int,input().split())
ball=('b'*A+'a'*B)*10000
print(ball[0:N].count('b'))

Buggy submission (verdict: Runtime Error):
N,A,B=map(int,input().split())
ball=('b'*A+'a'*B)*N
print(ball[0:N].count('b'))

Buggy submission (verdict: Runtime Error):
N,A,B=map(int,input().split())
ball=('b'*A+'a'*B)*10000
print(ball[0:N].count('b'))N,A,B=map(int,input().split())
ball=('b'*A+'a'*B)*N
print(ball[0:N].count('b'))
Problem p02759 (python)

Fixed submission:
num = int(input())
if num % 2 == 0:	
    print(int(num/2))
else:
    print(int(num/2+1))

Buggy submission (verdict: Runtime Error):

num = int(input())
if num % 2 == 0:	
     print(n/2)
else:
     print(n/2+1)
Problem p02759 (python)

Fixed submission:
import math

N = int(input())
print(math.ceil(N / 2))

Buggy submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(100001)
N, M, K = map(int, input().split())

label = [-1] * N
n_label = [0] * N

F, B = {}, {}
for i in range(N):
    F[i] = set()
    B[i] = set()

for _ in range(M):
    x, y = map(int, input().split())
    F[x - 1].add(y - 1)
    F[y - 1].add(x - 1)

for _ in range(K):
    x, y = map(int, input().split())
    B[x - 1].add(y - 1)
    B[y - 1].add(x - 1)


def dfs(v, lab):
    if label[v] != -1:
        return 0
    label[v] = lab
    n_label[lab] += 1
    for n in F[v]:
        dfs(n, lab)
    return 1


# labeling
count = 0
for i in range(N):
    count += dfs(i, count)
n_label = n_label[:count]

# calc friend candidate
blocked = 0
for b in B[0]:
    if label[b] == label[0]:
        blocked += 1
print(n_label[label[0]] - 1 - len(F[0]) - blocked, end='')
for i in range(1, N):
    print(' ', end='')
    blocked = 0
    for b in B[i]:
        if label[b] == label[i]:
            blocked += 1
    print(n_label[label[i]] - 1 - len(F[i]) - blocked, end='')
print('')
Problem p02595 (python)

Fixed submission:
import math

N,D=map(int,input().split())
sum=0
for _ in range(N):
    X,Y=map(int,input().split())
    if math.sqrt(((X*X)+(Y*Y)))<=D:
        sum=sum+1
print(sum)

Buggy submission (verdict: Runtime Error):
N,D=map(int,input().split())
sum=0
for _ in range(N):
    X,Y=map(int,input().split())
    if math.sqrt(((X*X)+(Y*Y)))<=D:
        sum=sum+1
print(sum)

Buggy submission (verdict: Runtime Error):
N,D=map(int,input().split())
sum=0
for _ in range(N):
    X,Y=map(int,input().split())
    if math.sqrt(((X*X)+(Y*Y)))<=D:
        sum=sum+1
    print(sum)
Problem p02659 (python)

Fixed submission:
import decimal

a, b = input().split()

a = int(a)
b = decimal.Decimal(b)

result = a * b

print(int(result))

Buggy submission (verdict: Runtime Error):
a, b = input().split()

result = int(a) * int(100 * float(b) // 100

print(result)

Buggy submission (verdict: Runtime Error):
a, b = input().split()

result = a * int(100 * b) // 100

print(result)
Problem p02689 (python)

Fixed submission:
#C
n, m = list(map(int, input().split()))
h = list(map(int, input().split()))


result = [1 for _ in range(n)]
for i in range(m):
    a, b = list(map(int, input().split()))
    if h[a-1] < h[b-1]:
        result[a-1] = 0
    elif h[a-1] > h[b-1]:
        result[b-1] = 0
    else:
        result[b-1] = 0
        result[a-1] = 0

print(result.count(1))

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


result = [[1 for _ in range(n)] for _ in range(m)]
for i in range(m):
    a, b = list(map(int, input().split()))
    if h[a-1] < h[b-1]:
        result[i][b-1] = 1
        result[i][a-1] = 0
    elif h[a-1] > h[b-1]:
        result[i][b-1] = 0
        result[i][a-1] = 1
    else:
        result[i][b-1] = 0
        result[i][a-1] = 0

ans = [1 for _ in range(n)]
for i in range(m):
    for j in result:
        if 0 in j:
            ans[result.index(j)] = 0

print(ans.count(1))
Problem p02759 (python)

Fixed submission:
N = int(input())
print((N + 1) // 2)

Buggy submission (verdict: Runtime Error):
N = input()
print((N + 1) // 2)

Buggy submission (verdict: Runtime Error):
print((input() + 1) // 2)
Problem p02935 (python)

Fixed submission:
N = int(input())
v = list(map(int, input().split()))
v.sort()
u = [0]*N
for i in range(N):
    if i == 0:
        u[0] = (v[0] + v[1]) / 2
    elif i == N-1:
        u[i] = (u[i-1]+v[i])/2
    else:
        u[i] = (u[i-1]+v[i+1])/2
print(u[-2])

Buggy submission (verdict: Runtime Error):
N = int(input())
v = list(map(int, input().split()))
v.sort()
u = [0]*(N-1)
for i in range(N):
    if i == 0:
        u[0] = (v[0] + v[1]) / 2
    else:
        u[i] = (u[i-1]+v[i+1])/2
print(u[-1])
Problem p02594 (python)

Fixed submission:
t = int(input())

if t >= 30:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
t = input()

if t >= 30:
  print("Yes")
else:
  print("No")
Problem p02627 (python)

Fixed submission:
alpha = input()
if alpha.isupper():
  print("A")
else:
  print("a")

Buggy submission (verdict: Runtime Error):
alpha = str(input())
if str.isupper(alpha) = True:
  print("A")
else:
  print("a")
Problem p02594 (python)

Fixed submission:
x=int(input())
if(x>=30):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
x=input()
if(x>=30):
  print("Yes")
else:
  print("No")
Problem p02759 (python)

Fixed submission:
import math

n=int(input())

print(math.ceil(n/2))

Buggy submission (verdict: Runtime Error):
import math

n=input()

print(math.ceil(n/2))

Buggy submission (verdict: Runtime Error):
import math

n=input()

print(math.ceil(n))