Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))

def dfs(A, k, cnt=0):
  s1, s2 = 0, 0
  for i in range(len(A)):
    if i <= N / 2:
      if A[k] > 1:
        A[k] -= 1
        cnt += 1
      s1 += A[i]
    else:
      if A[k] > 1:
        A[k] -= 1 
      s2 += A[i]
  if s1 == s2:
    return cnt
  if A[k] > 1:
    return dfs(A, k, cnt)
  else:
    return dfs(A, k + 1, cnt)

s = 0
for i in range(len(A)):
  s += A[i]
if s % 2 == 0:
  print(0)
  exit()
else:
  ans = dfs(A, 0)
  print(ans)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
total = sum(A)
mid = total // 2
sum_left, sum_left2 = 0, 0
seperation_i = 0
for i, l in enumerate(A[:-1]):
  sum_left += l
  if sum_left >= mid:
      seperation_i = i
      sum_left2 = sum_left - l
      break
sum_right, sum_right2 = sum(A[seperation_i + 1:]), sum(A[seperation_i:])
print(min(abs(sum_right - sum_left), abs(sum_right2 - sum_left2)))

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

def dfs(A, k, cnt=0):
  s1, s2 = 0, 0
  for i in range(len(A)):
    if i <= N / 2:
      if A[k] > 1:
        A[k] -= 1
        cnt += 1
      s1 += A[i]
    else:
      if A[k] > 1:
        A[k] -= 1 
      s2 += A[i]
  if s1 == s2:
    return cnt
  if A[k] > 1:
    return dfs(A, k, cnt)
  else:
    return dfs(A, k + 1, cnt)

s = 0
for i in range(len(A)):
  s += A[i]
if s / 2 == 0:
  print(0)
  exit(0)
else:
  ans = dfs(A, 0)
  print(ans)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
total = sum(A)
mid = total // 2
sum_left, sum_left2 = 0, 0
seperation_i = 0
for i, l in enumerate(A[:-1]):
  sum_left += l
  if sum_left >= mid:
      seperation_i = i
      sum_left2 = sum_left - l
      break
sum_right, sum_right2 = sum(A[seperation_i + 1:]), sum(A[seperation_i:])
print(min(abs(sum_right - sum_left), abs(sum_right2 - sum_left2)))

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

def dfs(A, k, cnt=0):
  s1, s2 = 0, 0
  for i in range(len(A)):
    if i <= N / 2:
      if A[k] > 1:
        A[k] -= 1
        cnt += 1
      s1 += A[i]
    else:
      if A[k] > 1:
        A[k] -= 1 
      s2 += A[i]
  if s1 == s2:
    return cnt
  if A[k] > 1:
    return dfs(A, k, cnt)
  else:
    return dfs(A, k + 1, cnt)

s = 0
for i in range(len(A)):
  s += A[i]
if s / 2 == 0:
  print(0)
  exit(0)
else:
  ans = dfs(A, 0)
  print(ans)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
total = sum(A)
mid = total // 2
sum_left, sum_left2 = 0, 0
seperation_i = 0
for i, l in enumerate(A[:-1]):
  sum_left += l
  if sum_left >= mid:
      seperation_i = i
      sum_left2 = sum_left - l
      break
sum_right, sum_right2 = sum(A[seperation_i + 1:]), sum(A[seperation_i:])
print(min(abs(sum_right - sum_left), abs(sum_right2 - sum_left2)))
Buggy python submission (verdict: Time Limit Exceeded):
def dfs(n):
    table =[]
    i = 2
    while n >= i**2:
    # nのその数自身を除いた素因数は√n以下であることから。
        while n % i == 0:
            table.append(i)
            n /= i
        i += 1
    if n > 1:
        table.append(int(n))
# 最後に残った、最大の素因数をリストに入れる。
    return table

N = int(input())
f_list = dfs(N)
if len(f_list) == 1:
  print(f_list[0] - 1)
  exit()
elif len(f_list) == 2:
  s = 0
  for f in f_list:
    s += f
  print(s - 2)
  exit()
ans = float('inf')
for x in range(10**12):
  if x + 1 > N:
    break
  for y in range(10**12):
    if (x + 1) * (y + 1) > N:
      break
    if (x + 1) * (y + 1) == N:
      ans = min((x + y), ans)
print(ans)

Fixed submission:
N = int(input())
from math import sqrt
def get_divs(n):
  divs = []
  for i in range(1, int(sqrt(n)) + 1):
    if n % i == 0:
      divs.append((i, n // i))
  return divs

divs = get_divs(N)
ans = float('inf')
for x, y in divs:
  ans = min(ans, (x + y - 2))
print(ans)
Buggy python submission (verdict: Runtime Error):
N, K, Q = map(int, input().split())
A = []
A = (int(x) for x in sys.stdin.read().split())
score = [K - Q] * (N + 1)
for a in A:
    score[a] += 1
ans = "\n".join("No" if s <= 0 else "Yes" for s in score[1:])
print(ans)

Fixed submission:
N, K, Q = map(int, input().split())
A = []
for q in range(Q):
    A.append(int(input()))
score = [K - Q] * (N + 1)
for a in A:
    score[a] += 1
ans = "\n".join("No" if s <= 0 else "Yes" for s in score[1:])
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N, K, Q = map(int, input().split())
A, P = [], []
for q in range(Q):
  A.append(int(input()))

if K > len(A):
  for _ in range(N):
    print("Yes")
  exit()

for _ in range(N):
  P.append(K)

for a in A:
  for i, p in enumerate(P):
    if i != (a - 1):
      P[i] -= 1

for p in P:
  if p <= 0:
    print("No")
  else:
    print("Yes")

Fixed submission:
N, K, Q = map(int, input().split())
A = []
for q in range(Q):
    A.append(int(input()))
score = [K - Q] * (N + 1)
for a in A:
    score[a] += 1
ans = "\n".join("No" if s <= 0 else "Yes" for s in score[1:])
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N, K, Q = map(int, input().split())
A, P = [], []
for q in range(Q):
  A.append(int(input()))
for _ in range(N):
  P.append(K)
for a in A:
  for i, p in enumerate(P):
    if i != (a - 1):
      P[i] -= 1
for p in P:
  if p <= 0:
    print("No")
  else:
    print("Yes")

Fixed submission:
N, K, Q = map(int, input().split())
A = []
for q in range(Q):
    A.append(int(input()))
score = [K - Q] * (N + 1)
for a in A:
    score[a] += 1
ans = "\n".join("No" if s <= 0 else "Yes" for s in score[1:])
print(ans)
Buggy python submission (verdict: Runtime Error):
from math import floor, sqrt

N = int(input())
ans = 0
for o in range(1, N + 1, 2):
	cnt = 0
    for n in range(1, 1 + floor(sqrt(o))):
    	if o % n == 0:
            cnt += 2
    if cnt == 8:
      ans += 1
print(ans)
        

Fixed submission:
from math import floor, sqrt
 
N = int(input())
ans = 0
for o in range(1, N + 1, 2):
    cnt = 0
    for n in range(1, 1 + floor(sqrt(o))):
    	if o % n == 0:
            cnt += 2
    if cnt == 8:
        ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
a = []
if N == 0:
  a.append["0"]
while N != 0:
  a.append(str(N % 2))
  N = -(N // 2)
print("".join(reversed(a)))

Fixed submission:
N = int(input())
a = []
if N == 0:
    a = ["0"]
while N != 0:
    a.append(str(N % 2)) # N mod 2
    N = -(N - N % 2) // 2 # (N − (N mod 2)) // 2
print("".join(list(reversed(a))))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a = []
if N == 0:
    a = ["0"]
while N != 0:
    a.append(str(N % 2))
    N = -(N - N % 2) 
print("".join(list(reversed(a))))

Fixed submission:
N = int(input())
a = []
if N == 0:
    a = ["0"]
while N != 0:
    a.append(str(N % 2)) # N mod 2
    N = -(N - N % 2) // 2 # (N − (N mod 2)) // 2
print("".join(list(reversed(a))))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a = []
if N == 0:
    a = ["0"]
while N != 0:
    a.append(str(N % 2))
    # N = -(N - N % 2) 
print("".join(list(reversed(a))))

Fixed submission:
N = int(input())
a = []
if N == 0:
    a = ["0"]
while N != 0:
    a.append(str(N % 2)) # N mod 2
    N = -(N - N % 2) // 2 # (N − (N mod 2)) // 2
print("".join(list(reversed(a))))
Buggy python submission (verdict: Runtime Error):
n = input()
print(n*n)

Fixed submission:
n = int(input())
print(n*n)
Buggy python submission (verdict: Runtime Error):
m = input()
s = input()
n = len(s)
if n%2 == 1:
	print("No")
else:
	if s[:n/2] == s[n/2:]:
		print("Yes")
	else:
		print("No")

Fixed submission:
m = input()
s = input()
n = len(s)
f = int(n/2)
if n%2 == 1:
	print("No")
else:
	if s[:f] == s[f:]:
		print("Yes")
	else:
		print("No")

Buggy python submission (verdict: Runtime Error):
s = input()
n = len(s)
if n%2 == 1:
	print("No")
else:
	if s[:n/2] == s[n/2:]:
		print("Yes")
	else:
		print("No")

Fixed submission:
m = input()
s = input()
n = len(s)
f = int(n/2)
if n%2 == 1:
	print("No")
else:
	if s[:f] == s[f:]:
		print("Yes")
	else:
		print("No")

Buggy python submission (verdict: Runtime Error):
s = input()
n = len(s)
if n%2 == 1
	print("No")
else
	if s[:n/2] == s[n/2:]
		print("Yes")
	else
		print("No")

Fixed submission:
m = input()
s = input()
n = len(s)
f = int(n/2)
if n%2 == 1:
	print("No")
else:
	if s[:f] == s[f:]:
		print("Yes")
	else:
		print("No")
Buggy python submission (verdict: Runtime Error):
import math
def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

n, k= map(int, input().split())
for i in range(1,k+1):
	t = combinations_count(n-k+1, i) *  combinations_count(k-1, k-i)
	s = t%1000000007
	print(s)

Fixed submission:
import math
def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

n, k= map(int, input().split())
for i in range(1,k+1):
	if n-k+1>=i:
		t = combinations_count(n-k+1, i) *  combinations_count(k-1, k-i)
		s = t%1000000007
		print(s)
	else:
		print(0)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

l = len(str(N))
a = 0

for i in range(l):
  a += N % 10
  N = N // 10
  
if a % 9 == 0:
  print("Yes")

else:
  print("No")

Fixed submission:
N = int(input())

l = str(N)
A = list(map(int, l))
a = sum(A)
  
if a % 9 == 0:
  print("Yes")

else:
  print("No")
Buggy python submission (verdict: Runtime Error):
n, K = [int(a) for a in input().split()]
s = [[int(a) for a in input().split()] for _ in range(K)]

MOD = 998244353

dp = [0] * (n + 1)
dp_sum = [0] * (n + 1)
dp[1] = 1

for i in range(1, n+1):
    for l, r in s:
         dp[i] += dp_sum[i-l if (i-l) > 0 else 0] - dp_sum[(i-r-1) if (i-r-1) > 0 else 0]
        dp_sum[i] = (dp[i] + dp_sum[i-1]) % MOD

print(dp[n] % MOD)

Fixed submission:
n, K = [int(a) for a in input().split()]
s = [[int(a) for a in input().split()] for _ in range(K)]

MOD = 998244353

dp = [0] * (n + 1)
dp_sum = [0] * (n + 1)
dp[1] = 1

for i in range(1, n+1):
    for l, r in s:
        dp[i] += dp_sum[i-l if (i-l) > 0 else 0] - dp_sum[(i-r-1) if (i-r-1) > 0 else 0]
        dp_sum[i] = (dp[i] + dp_sum[i-1]) % MOD

print(dp[n] % MOD)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = [int(s) for s in input().split()]

PRIME_LENGTH = 10**6

prime_list = [[] for _ in range(PRIME_LENGTH)]

for i in range(2, PRIME_LENGTH):
    if not prime_list[i]:
        idx = i
        while (idx < PRIME_LENGTH):
            prime_list[idx].append(i)
            idx += i

vote = [0] * (PRIME_LENGTH)

for a in A:
    for v in prime_list[a]:
        vote[v] += 1

if max(vote) == len(A):
    print("not coprime")
elif sum(map(lambda x: x > 1, vote)) > 0:
    print("setwise coprime")
else:
    print("pairwise coprime")


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

PRIME_LENGTH = (10**6 + 1)

prime_list = [[] for _ in range(PRIME_LENGTH)]

for i in range(2, PRIME_LENGTH):
    if not prime_list[i]:
        idx = i
        while (idx < PRIME_LENGTH):
            prime_list[idx].append(i)
            idx += i

vote = [0] * (PRIME_LENGTH)

for a in A:
    for v in prime_list[a]:
        vote[v] += 1

if max(vote) == len(A):
    print("not coprime")
elif sum(map(lambda x: x > 1, vote)) > 0:
    print("setwise coprime")
else:
    print("pairwise coprime")
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3
N, M, K = [int(s) for s in input().split()]
A = [int(s) for s in input().split()]
B = [int(s) for s in input().split()]
i = 0
j = M-1

B_SUM = [0] * M
B_SUM[0] = B[0]

max_book = 0

for i in range(1, M):
    B_SUM[i] = B[i] + B_SUM[i - 1]
    if B_SUM[i] <= K:
        max_book = i + 1

A_SUM = 0

b_index = M - 1

for i in range(N):
    A_SUM += A[i]
    while (b_index >= 0):
        B_SUM[b_index]
        if A_SUM + B_SUM <= K:
            break
        b_index -= 1
    max_book = max(max_book, b_index + 1 + i + 1)

print(max_book)

Fixed submission:
#!/usr/bin/env python3
N, M, K = [int(s) for s in input().split()]
A = [int(s) for s in input().split()]
B = [int(s) for s in input().split()]
i = 0
j = M-1

B_SUM = [0] * M
A_SUM = [0] * N
B_SUM[0] = B[0]
A_SUM[0] = A[0]
max_book = 0

if B_SUM[0] <= K:
    max_book = 1

for i in range(1, M):
    B_SUM[i] = B[i] + B_SUM[i - 1]
    if B_SUM[i] <= K:
        max_book = i + 1

A_SUM = 0
b_index = M - 1

for i in range(N):
    A_SUM += A[i]
    while (b_index >= 0):
        B_SUM[b_index]
        if A_SUM + B_SUM[b_index] <= K:
            max_book = max(max_book, b_index + 1 + i + 1)
            break
        b_index -= 1
    if (A_SUM <= K):
        max_book = max(max_book, i + 1)
print(max_book)
Buggy python submission (verdict: Runtime Error):
T = list(input())

if T[0] == '?':
    if T[1] == 'P':
        T[0] = 'D'
    else:
        T[0] = 'P'


for i in range(1, len(T)-1):
    if T[i] == '?':
        if T[i - 1] == 'D' and (T[i + 1] == 'D' or T[i + 1] == '?'):
            T[i] = 'P'
        else:
            T[i] = 'D'

if T[-1] == '?':
    T[-1] = 'D'

print(''.join(T))


Fixed submission:
T = list(input())

if len(T) == 1:
    print('D')
    exit()

if T[0] == '?':
    if T[1] == 'P':
        T[0] = 'D'
    else:
        T[0] = 'P'


for i in range(1, len(T)-1):
    if T[i] == '?':
        if T[i - 1] == 'D' and (T[i + 1] == 'D' or T[i + 1] == '?'):
            T[i] = 'P'
        else:
            T[i] = 'D'

if T[-1] == '?':
    T[-1] = 'D'

print(''.join(T))

Buggy python submission (verdict: Runtime Error):
T = list(input())

if T[0] == '?':
    if T[1] == 'P':
        T[0] = 'D'
    else:
        T[0] = 'P'


for i in range(1, len(T)-1):
    if T[i] == '?':
        if T[i - 1] == 'D' and T[i + 1] == 'D':
            T[i] = 'P'
        else:
            T[i] = 'D'

if T[-1] == '?':
    T[-1] = 'D'

print(''.join(T))

Fixed submission:
T = list(input())

if len(T) == 1:
    print('D')
    exit()

if T[0] == '?':
    if T[1] == 'P':
        T[0] = 'D'
    else:
        T[0] = 'P'


for i in range(1, len(T)-1):
    if T[i] == '?':
        if T[i - 1] == 'D' and (T[i + 1] == 'D' or T[i + 1] == '?'):
            T[i] = 'P'
        else:
            T[i] = 'D'

if T[-1] == '?':
    T[-1] = 'D'

print(''.join(T))
Buggy python submission (verdict: Runtime Error):
from collections import deque

N, M = [int(s) for s in input().split()]
edge = [[int(s) - 1 for s in input().split()] for _ in range(M)]
graph = [[] for _ in range(N)]
for i, j in edge:
    graph[i].append(j)
    graph[j].append(i)

dq = deque([0])
visited = [False] * N
visited[0] = True
parent = [0]*N
while(dq):
    search_obj = dq.pop()
    for candidate_obj in graph[search_obj]:
        if not visited[candidate_obj]:
            dq.appendleft(candidate_obj)
            parent[candidate_obj] = search_obj
            visited[candidate_obj] = True

total_visited = sum(visited)
if total_visited < N:
    print('No')
else:
    print('Yes')
    for i in range(1, N):
        print(parent[i]+1)

Fixed submission:
N = input()

if N[-1] == '3':
    print('bon')
elif N[-1] in ['0', '1', '6', '8']:
    print('pon')
else:
    print('hon')
Buggy python submission (verdict: Runtime Error):
from collections import deque

N, M = [int(s) for s in input().split()]
edge = [[int(s) - 1 for s in input().split()] for _ in range(M)]
graph = [[] for _ in range(M)]
for i, j in edge:
    graph[i].append(j)
    graph[j].append(i)

dq = deque([0])
visited = [False] * N
visited[0] = True
parent = [0]*N
while(dq):
    search_obj = dq.pop()
    for candidate_obj in graph[search_obj]:
        if not visited[candidate_obj]:
            dq.appendleft(candidate_obj)
            parent[candidate_obj] = search_obj
            visited[candidate_obj] = True

total_visited = sum(visited)
if total_visited < N:
    print('No')
else:
    print('Yes')
    for i in range(1, N):
        print(parent[i]+1)

Fixed submission:
from collections import deque

N, M = [int(s) for s in input().split()]
edge = [[int(s) - 1 for s in input().split()] for _ in range(M)]
graph = [[] for _ in range(N)]
for i, j in edge:
    graph[i].append(j)
    graph[j].append(i)

dq = deque([0])
visited = [False] * N
visited[0] = True
parent = [0]*N
while(dq):
    search_obj = dq.pop()
    for candidate_obj in graph[search_obj]:
        if not visited[candidate_obj]:
            dq.appendleft(candidate_obj)
            parent[candidate_obj] = search_obj
            visited[candidate_obj] = True

total_visited = sum(visited)
if total_visited < N:
    print('No')
else:
    print('Yes')
    for i in range(1, N):
        print(parent[i]+1)
Buggy python submission (verdict: Runtime Error):
import math
from functools import reduce


def gcd(*numbers):
    return reduce(math.gcd, numbers)

N = int(input())
cnt = 0
for i in range(1, N+1):
    for j in range(i, N + 1):
        for k in range(k, N + 1)
            cnt += gcd(i, j, k)
print(cnt)

Fixed submission:
import math
from functools import reduce


def gcd(*numbers):
    return reduce(math.gcd, numbers)


N = int(input())
cnt = 0
for i in range(1, N+1):
    for j in range(1, N + 1):
        for k in range(1, N + 1):
            cnt += gcd(i, j, k)
print(cnt)
Buggy python submission (verdict: Runtime Error):
def LI():
	return [ int(s) for s in input().split() ]
N,M = LI()
A = LI()

print('Yes') if sum(map(lambda x: x >= (1/4/M))) >= M else print('No')



Fixed submission:
def LI():
	return [ int(s) for s in input().split() ]
N,M = LI()
A = LI()
sum_A = sum(A)
 
print('Yes') if sum(map(lambda x: x >= sum_A*(1/4/M), A)) >= M else print('No')
Buggy python submission (verdict: Runtime Error):
import collections
import sys

def LI():
	return [ int(s) for s in input().split() ]

N = int(input())
A = LI()

c_counter = collections.Counter(A)
c_dict = dict(c_counter)

total = 0
total_dict = {}

for k,v in c_dict.items():
  if v >= 2:
    comb = v*(v-1)//2
    total_dict[k] = comb
    total += comb

for a in A:
  if total == 0:
    print(0)
  else:
    print(total - total_dict[a] + (c_dict[a]-1)*(c_dict[a]-2)//2) 

Fixed submission:
import collections
 
def LI():
	return [ int(s) for s in input().split() ]
 
N = int(input())
A = LI()
 
c_counter = [0]*(2*(10**5))
 
for a in A:
  c_counter[a]+=1
 
total = 0
total_dict = [0]*(2*(10**5))
 
for a in range(len(c_counter)):
  v = c_counter[a]
  if v >= 2:
    comb = v*(v-1)//2
    total_dict[a] = comb
    total += comb
 
for a in A:
  if total == 0:
    print(0)
  else:
    print(total - total_dict[a] + (c_counter[a]-1)*(c_counter[a]-2)//2)

Buggy python submission (verdict: Runtime Error):
import collections
import sys

def LI():
	return [ int(s) for s in input().split() ]

N = int(input())
A = LI()

c_counter = collections.Counter(A)
c_dict = dict(c_counter)


total = 0
total_dict = {}

for k,v in c_dict.items():
  if v >= 2:
    comb = v*(v-1)//2
    total_dict[k] = comb
    total += comb
    
if total == 0:
  print(0)
  sys.exit()

for a in A:
  print(total - total_dict[a] + (c_dict[a]-1)*(c_dict[a]-2)//2) 

Fixed submission:
import collections
 
def LI():
	return [ int(s) for s in input().split() ]
 
N = int(input())
A = LI()
 
c_counter = [0]*(2*(10**5))
 
for a in A:
  c_counter[a]+=1
 
total = 0
total_dict = [0]*(2*(10**5))
 
for a in range(len(c_counter)):
  v = c_counter[a]
  if v >= 2:
    comb = v*(v-1)//2
    total_dict[a] = comb
    total += comb
 
for a in A:
  if total == 0:
    print(0)
  else:
    print(total - total_dict[a] + (c_counter[a]-1)*(c_counter[a]-2)//2)

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

def LI():
	return [ int(s) for s in input().split() ]

N = int(input())
A = LI()

c_counter = collections.Counter(A)
c_dict = dict(c_counter)


total = 0
total_dict = {}

for k,v in c_dict.items():
  if v >= 2:
    comb = v*(v-1)//2
    total_dict[k] = comb
    total += comb

for a in A:
  print(total - total_dict[a] + (c_dict[a]-1)*(c_dict[a]-2)//2) 

Fixed submission:
import collections
 
def LI():
	return [ int(s) for s in input().split() ]
 
N = int(input())
A = LI()
 
c_counter = [0]*(2*(10**5))
 
for a in A:
  c_counter[a]+=1
 
total = 0
total_dict = [0]*(2*(10**5))
 
for a in range(len(c_counter)):
  v = c_counter[a]
  if v >= 2:
    comb = v*(v-1)//2
    total_dict[a] = comb
    total += comb
 
for a in A:
  if total == 0:
    print(0)
  else:
    print(total - total_dict[a] + (c_counter[a]-1)*(c_counter[a]-2)//2)
Buggy python submission (verdict: Runtime Error):
import math

def LI():
	return [ int(s) for s in input().split() ]
  
a,b,c = LI()

check = c-b-a 
print('Yes') if check > 0 and 4*a*b < check**2 print('No')

Fixed submission:
import math

def LI():
	return [ int(s) for s in input().split() ]
  
a,b,c = LI()
check = c-b-a 

print('Yes') if check > 0 and 4*a*b < check**2 else print('No')
Buggy python submission (verdict: Runtime Error):
import math

def is_prime(x):
  if x <= 1:
    return False
  max_judge = math.sqrt(x)
  count = 2
  while(count < max_judge):
    if x % count == 0:
      return False
    count+=1
  return True
 
x = int(input())
 
judge_prime = False

while(True):
  if is_prime(x):
    break
  x+=1

print(x)

Fixed submission:
s, t = input().split()
print(t + s)

Buggy python submission (verdict: Runtime Error):
class CookieCalc:
  def __init__(self, t_cookie, a_cookie):
    self.takahashi_cookie = t_cookie
    self.aoki_cookie = a_cookie
    
  def eat_cookie(self):
    if self.takahashi_cookie > 0:
      self.takahashi_cookie-=1
    elif self.aoki_cookie > 0:
      self.aoki_cookie -= 1
      
  def sum_cookie(self):
    return self.takahashi_cookie + self.aoki_cookie
      
t_cookie,a_cookie,K = [int(s) for s in input().split()]
cookie = CookieCalc(t_cookie, a_cookie)
 
for i in range(K):
  cookie.eat_cookie()
  if cookie.sum_cookie() == 0:
    break
    
  
print(cookie.takahashi_cookie, cookie.aoki_cookie)  

Fixed submission:
s, t = input().split()
print(t + s)

Buggy python submission (verdict: Runtime Error):
S, T = input()
print(T + S)

Fixed submission:
s, t = input().split()
print(t + s)
Buggy python submission (verdict: Runtime Error):
def is_prime(x):
  if x <= 1:
    return False
  max_judge = sqrt(x)
  count = 2
  while(count < max_judge):
    if x % count == 0:
      return True
  return False

x = int(input())

judge_prime = False
while(!judge_prime):
  judge_prime = is_prime(x)
  
return x

Fixed submission:
import math

def is_prime(x):
  if x <= 1:
    return False
  max_judge = math.sqrt(x)
  count = 2
  while(count < max_judge):
    if x % count == 0:
      return False
    count+=1
  return True
 
x = int(input())
 
judge_prime = False

while(True):
  if is_prime(x):
    break
  x+=1

print(x)
Buggy python submission (verdict: Runtime Error):
N = int(input())
nums = [int(s) for s in input().split()]
 
min_breaks = -1
 
count_num = 1
break_index = 1

for i in range(N):
  if nums[i] == count_num:
      if min_breaks == -1:
          min_breaks = 0
      if count_num == 1:
      	 min_breaks += ((i+1) - break_index)
      else:
         min_breaks += ((i+1) - break_index - 1)
      
      break_index = (i+1)
      count_num+=1

if break_index < N and min_breaks != -1:
  min_breaks += ((i+1) - break_index)
  
print(min_breaks)

Fixed submission:
num = sum([int(input()) for s in range(2)])

if num == 5:
  print(1)
elif num == 4:
  print(2)
else:
  print(3)
Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = 1
delta = 0.00000001
while( C < B ):
  if C*A % B < delta:
    break
  C+=1
  
print(C*A)

Fixed submission:
A,B = [int(s) for s in input().split()]

C = 1
delta = 0.00000001
while( C < B ):
  if C*A % B < delta:
    break
  C+=1
  
print(C*A)

Buggy python submission (verdict: Runtime Error):
C = 1
delta = 0.00000001
while( C >= B ):
  if C*A % B < delta:
    break
  C+=1
  
print(C*A)

Fixed submission:
A,B = [int(s) for s in input().split()]

C = 1
delta = 0.00000001
while( C < B ):
  if C*A % B < delta:
    break
  C+=1
  
print(C*A)