Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
a b=int(input().split())
if a < 10:
  print(b)
else:
  print(b-1000+100*a)


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

if a >=10:
  c=int(b)
  print(c)
else:
  c=int(b+1000-100*a)
  print(c)

Buggy python submission (verdict: Runtime Error):
a,b=int(input().split())
if a < 10:
  print(b)
else:
  print(b-1000+100*a)


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

if a >=10:
  c=int(b)
  print(c)
else:
  c=int(b+1000-100*a)
  print(c)

Buggy python submission (verdict: Runtime Error):
a,b=int(input().split())
if a < 10:
  print(b)
else:
  print(b+1000-100*a)

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

if a >=10:
  c=int(b)
  print(c)
else:
  c=int(b+1000-100*a)
  print(c)

Buggy python submission (verdict: Runtime Error):
a,b=int(input().split())
if a < 10:
  c = int(b-1000+199*a)
else:
  c = int(b)
print(c)

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

if a >=10:
  c=int(b)
  print(c)
else:
  c=int(b+1000-100*a)
  print(c)

Buggy python submission (verdict: Runtime Error):
a,b=int(input().split())
if a < 10 :
  c = int(b-1000+100*a)
else:
  c = b
ptint(c)

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

if a >=10:
  c=int(b)
  print(c)
else:
  c=int(b+1000-100*a)
  print(c)
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
c=int(500*a-b)
if c >0:
  print(Yes)
else:
  print(No)

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

Fixed submission:
a=int(input())
b=int(-(-a//2))
print(b/a)
Buggy python submission (verdict: Runtime Error):
import math

N = [int(input()) for i in range(100)]
min_page = math.ceil(N/2)
print(min_page)


Fixed submission:
import math
N = int(input())
min_page = math.ceil(N/2)
print(min_page)

Buggy python submission (verdict: Runtime Error):
import math
N = input()
min_page = math.ceil(N/2)
print(min_page)

Fixed submission:
import math
N = int(input())
min_page = math.ceil(N/2)
print(min_page)

Buggy python submission (verdict: Runtime Error):
page_N = input("Please Number")
min_page = round(page_N / 2)
print(min_page)

Fixed submission:
import math
N = int(input())
min_page = math.ceil(N/2)
print(min_page)
Buggy python submission (verdict: Runtime Error):
A = input()
B = input()
if int(A) <= 8 and int(B) <= 8:
    print('Yay!')
if 9 <= int(A) <=16 or 9 <= int(B) <= 16: 
    print(':(')

Fixed submission:
A, B = map(int, input().split())
if A <= 8 and B <= 8:
    print('Yay!')
else:
    print(':(')

Buggy python submission (verdict: Runtime Error):
A = input()
B = input()
if int(A) <= 8 and int(B) <= 8:
    print('Yay!')
else:
    print(':(')

Fixed submission:
A, B = map(int, input().split())
if A <= 8 and B <= 8:
    print('Yay!')
else:
    print(':(')

Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())
if A <= 8 and B <= 8:
    print('Yay!')
else:
    print(':(')

Fixed submission:
A, B = map(int, input().split())
if A <= 8 and B <= 8:
    print('Yay!')
else:
    print(':(')

Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())
if A <= 8 and B <= 8:
    print('Yay!')
else:
    print(':(')

Fixed submission:
A, B = map(int, input().split())
if A <= 8 and B <= 8:
    print('Yay!')
else:
    print(':(')

Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())
if A <= 8 and B <= 8:
     print('Yay!')
else:
     print(':(')

Fixed submission:
A, B = map(int, input().split())
if A <= 8 and B <= 8:
    print('Yay!')
else:
    print(':(')

Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())
if (A <= 8 and B <= 8):
    print('Yay!')
else:
    print(':(')

Fixed submission:
A, B = map(int, input().split())
if A <= 8 and B <= 8:
    print('Yay!')
else:
    print(':(')
Buggy python submission (verdict: Runtime Error):
A, B, C = map(int, input().split())
if (A+B)>=C:
print('Yes')
else:
print('No')

Fixed submission:
A, B, C = map(int, input().split())
if (A+B) >= C:
    print('Yes')
else:
      print('No')
Buggy python submission (verdict: Runtime Error):
import math
N, K = tuple(map(int, input().split()))
base = 1 / N

if N == K:
  print(base)
s = 0
for i in range(1, N+1):
  n = math.ceil(math.log2((K-1)/i))
  print(i, n)
  s += base * (0.5 ** n)
print(s)

Fixed submission:
import math
N, K = tuple(map(int, input().split()))
base = 1 / N

if N == K:
  s = base
  end = K
elif N > K:
  s = (N-K+1) / N
  end = K
else:
  s = 0
  end = N+1
for i in range(1, end):
  n = math.ceil(math.log2(K/i))
  s += base * (0.5 ** n)
print(s)
Buggy python submission (verdict: Runtime Error):
a, b = input()
a, b = int(a), int(b)
if b % a == 0:
  print(a+b)
else:
  print(b-a)

Fixed submission:
a, b = input().split()
a, b = int(a), int(b)
if b % a == 0:
  print(a+b)
else:
  print(b-a)
Buggy python submission (verdict: Runtime Error):
n = input()
l = input().split()
l = map(int, l)
max, min = max(l), min(l)
print(max - min)

Fixed submission:
n = input()
l = input().split()
l = list(map(int, l))
max, min = max(l), min(l)
print(max-min)
Buggy python submission (verdict: Runtime Error):
a, b = input().split()
if (a*b) % 2 == 0:
  print("Even")
else:
  print("Odd")

Fixed submission:
a, b = map(int, input().split())
if (a*b) % 2 == 0:
  print("Even")
else:
  print("Odd")
Buggy python submission (verdict: Runtime Error):
import sys
import math

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

a = list(map(int,input().split()))
ans = lcm(a[0], a[1])

print(ans)

Fixed submission:
import sys
import fractions

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

a = list(map(int,input().split()))
ans = lcm(a[0], a[1])

print(ans)

Buggy python submission (verdict: Runtime Error):
# coding: utf-8
# Your code here!

import math

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

a = list(map(int,input().split()))
ans = lcm(a[0], a[1])
print(ans)

Fixed submission:
import sys
import fractions

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

a = list(map(int,input().split()))
ans = lcm(a[0], a[1])

print(ans)
Buggy python submission (verdict: Runtime Error):
from math import factorial
N = int(input())
K = int(input())


def n_C_k(n, k):
    factorial_n = factorial(n)
    factorial_k = factorial(k)
    factorial_nk = factorial(n-k)
    return factorial_n//(factorial_k*factorial_nk)

def solve(N, k):
    #ls = list(str(N))
    n = str(N)
    keta = len(n)

    if k == 0:
        return 0

    t = n[0]
    s = ""

    for i in range(keta-1):
        t += "0"
    for i in range(keta-1):
        s += n[i+1]
    return solve2(t, k) + solve(s, k-1)

def solve2(t, k):
    n = str(t)
    keta = len(n)
    #print(keta, )
    if k == 1:
        print(t, k)
        print((keta-1)*9+int(n[0]))
        return (keta-1)*9+int(n[0])
    if k == 2:
        out = 0
        out += (int(n[0])-1)*(keta-1)*9 #最上桁を使う場合
        #print(out, 5555)
        if keta-1 >= 2:
            out += n_C_k(keta-1, 2)*9*9  # 最上桁を使わない場合
        print(t, k)
        print(out)
        return out
    else:
        out = 0
        if keta-1 >= 2:
            out += (int(n[0])-1)*n_C_k(keta-1, 2)*9*9
        if keta-1 >= 3:
            out += n_C_k(keta-1, 3)*9*9*9
        return out

    
ans = solve(N, K)
print(ans)

Fixed submission:

"""dp1,2[i][j] 
i桁で0をj個含む数で, 
dp1→ Nの上からi桁目までを抽出した数より小さい
dp2→ Nの上からi桁目までを抽出した数に等しい
"""

N = int(input())
K = int(input())
digit = len(str(N))
N_str = str(N)

dp1 = [[0]*4 for _ in range(digit+1)]
dp2 = [[0]*4 for _ in range(digit+1)]

dp2[0][0] = 1

for i in range(1, digit+1):
    for j in range(4):
        if int(N_str[i-1]) != 0:
            if j >= 1:
                dp2[i][j] = dp2[i-1][j-1]
                dp1[i][j] = dp1[i-1][j]+9*dp1[i-1][j-1]+dp2[i-1][j]+dp2[i-1][j-1]*(int(N_str[i-1])-1)
            else:
                dp1[i][j] = dp1[i-1][j]+dp2[i-1][j]
        else:
            dp2[i][j] = dp2[i-1][j]
            if j >= 1:
                dp1[i][j] = dp1[i-1][j]+9*dp1[i-1][j-1]
            else:
                dp1[i][j] = dp1[i-1][j]

        #print(i, j, dp1[i][j], dp2[i][j])

ans = dp1[digit][K]+dp2[digit][K]

print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
P = list(map(int,input().split()))
Q = list(map(int,input().split()))

def kaijou(n):
    x = 1
    for i in range (1,n+1):
        x *= i
    return x

kaijou_ls = [0]*N

for i in range(N):
    kaijou_ls[i] = kaijou(i+1)

#dp
def count_order(A,k):
    if k==1:
        return 1
    else:
        B = A[N-k:]
        b = B[0]
        C = B.copy()
        C.sort()
        order = C.index(b)*kaijou_ls[k-2]

        return order+count_order(A,k-1)

print(abs(count_order(P,N)-count_order(Q,N)))




Fixed submission:
N = int(input())
P = list(map(int,input().split()))
Q = list(map(int,input().split()))

def kaijou(n):
    x = 1
    for i in range (1,n+1):
        x *= i
    return x

kaijou_ls = [0]*N

for i in range(N):
    kaijou_ls[i] = kaijou(i+1)

#dp
def count_order(A,k):
    if k==1:
        return 1
    else:
        B = A[N-k:]
        b = B[0]
        C = B.copy()
        C.sort()
        order = C.index(b)*kaijou_ls[k-2]

        return order+count_order(A,k-1)

print(abs(count_order(P,N)-count_order(Q,N)))
Buggy python submission (verdict: Runtime Error):
import math
N,M = map(int,input().split())
a = list(map(int,input().split()))

def count_2(x):
    count = 0
    while x%2 == 0:
        count += 1
        x /= 2
    return count

flag = True

for i in range(N-1):
    if count_2(a[i]) != count_2(a[i+1]):
        flag = False
        break
    
if not flag:
    print(0)
    exit()

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

ans=0
if lcm//2<M:
    ans=(M-lcm//2)//lcm+1

print(ans)

Fixed submission:
from fractions import gcd
N,M = map(int,input().split())
a = list(map(int,input().split()))

def count_2(x):
    count = 0
    while x%2 == 0:
        count += 1
        x /= 2
    return count

flag = True

for i in range(N-1):
    if count_2(a[i]) != count_2(a[i+1]):
        flag = False
        break
    
if not flag:
    print(0)
    exit()

lcm=1
for i in range(N):
    lcm = lcm*a[i]//gcd(a[i],lcm)

ans=0
if lcm//2<=M:
    ans=(M-lcm//2)//lcm+1

print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
N_sqrt = int(N**(1/2))
for i in range(1,N_sqrt):
    if N%i == 0:
        num = i
ans = num+N/num-2
print(ans)


Fixed submission:
N = int(input())
N_sqrt = int(N**(1/2))
for i in range(1,N_sqrt+1):
    if N%i == 0:
        num = i
ans = num+N//num-2
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N,K,Q = list(map(int,input().split()))
A = []
[A.append(int(input())) for i in range(Q)]

B = [K]*N

for a in A:
    B = list(map(lambda x:x-1,B))
    B[a-1] += 1
for b in B:
    if b>0:
        print("Yes")
    else:
        print("No")


Fixed submission:
N,K,Q = list(map(int,input().split()))
A = []
[A.append(int(input())) for i in range(Q)]

B = [K]*N

for a in A:
    B[a-1] += 1
B = list(map(lambda x:x-Q,B))
for b in B:
    if b>0:
        print("Yes")
    else:
        print("No")
Buggy python submission (verdict: Time Limit Exceeded):
from bisect import insort_left 

N, M = list(map(int,input().split()))
A = list(map(int,input().split()))
A.sort()

for i in range(M):
    x = A.pop()
    insort_left(A,x//2)

print(sum(A))


Fixed submission:
import heapq

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

A = list(map(lambda x:-x,A))

heapq.heapify(A)

for i in range(M):
    x = heapq.heappop(A)
    heapq.heappush(A,x/2)

ans = 0

for i in range(N):
    x = heapq.heappop(A)
    ans += int(-x)

print(ans)
Buggy python submission (verdict: Runtime Error):
import sys
import heapq

N,M = [int(k) for k in sys.stdin.readline().split()]

job=[]
for i in range(N):
    A,B = [int(k) for k in sys.stdin.readline().split()]
    job.append((A,-B))

job.sort(key=lambda t: -t[0])

heap=[]
heapq.heapify(heap)

ans=0

for i in range(1,M+1):
    if len(job)!=0:
      while job[-1][0]==i:
         heapq.heappush(heap,job.pop()[1])
          if len(job)==0:
             break
    if len(heap) == 0:
        continue
    ans -= heapq.heappop(heap)
    
print(ans)


Fixed submission:
import sys
import heapq

N,M = [int(k) for k in sys.stdin.readline().split()]

job=[]
for i in range(N):
    A,B = [int(k) for k in sys.stdin.readline().split()]
    job.append((A,-B))

job.sort(key=lambda t: -t[0])

heap=[]
heapq.heapify(heap)

ans=0

for i in range(1,M+1):
    if len(job)!=0:
      while job[-1][0]==i:
          heapq.heappush(heap,job.pop()[1])
          if len(job)==0:
             break
    if len(heap) == 0:
        continue
    ans -= heapq.heappop(heap)
    
print(ans)

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

N,M = [int(k) for k in sys.stdin.readline().split()]

job=[]
for i in range(N):
    A,B = [int(k) for k in sys.stdin.readline().split()]
    job.append((A,-B))

job.sort(key=lambda t: -t[0])

heap=[]
heapq.heapify(heap)

ans=0

for i in range(1,M+1):
    if len(job)!=0:
      while job[-1][0]==i:
         heapq.heappush(heap,job.pop()[1])
          if len(job)==0:
             break
    if len(heap) == 0:
        continue
    ans -= heapq.heappop(heap)
    
print(ans)


Fixed submission:
import sys
import heapq

N,M = [int(k) for k in sys.stdin.readline().split()]

job=[]
for i in range(N):
    A,B = [int(k) for k in sys.stdin.readline().split()]
    job.append((A,-B))

job.sort(key=lambda t: -t[0])

heap=[]
heapq.heapify(heap)

ans=0

for i in range(1,M+1):
    if len(job)!=0:
      while job[-1][0]==i:
          heapq.heappush(heap,job.pop()[1])
          if len(job)==0:
             break
    if len(heap) == 0:
        continue
    ans -= heapq.heappop(heap)
    
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
S = input()

mod=13
mod2=10**9+7
def pow_mod(x,n):
    if n==0:
        return 1
    
    K = 1
    while n>1:
        if n%2 != 0:
            K *= x
            K %= mod
        x *= x
        x %= mod
        n //= 2

    return (K*x)%mod

dp = np.zeros((10**5+1,13),dtype="int")
S=S[::-1]
if S[0]=="?":
    for j in range(10):
        dp[1][j] = 1
else:
    dp[1][int(S[0])] = 1

for i in range(1,len(S)):
    amari = pow_mod(10,i)
    if S[i]=="?":
        for j in range(13):
            for k in range(10):
                dp[i+1][j] += dp[i][(j-amari*k)%mod]
            dp[i+1][j] %= mod2
    else:
        for j in range(13):
            dp[i+1][j] += dp[i][(j-amari*int(S[i]))%mod]
            dp[i+1][j] %= mod2

print(dp[len(S)][5])

Fixed submission:
#import numpy as np
S = input()
N = len(S)
mod=13
mod2=10**9+7
def pow_mod(x,n):
    if n==0:
        return 1
    
    K = 1
    while n>1:
        if n%2 != 0:
            K *= x
            K %= mod
        x *= x
        x %= mod
        n //= 2

    return (K*x)%mod

#dp = np.zeros((N+1,13),dtype="int")
dp = [[0] * 13 for i in range(N+1)]
S=S[::-1]
if S[0]=="?":
    for j in range(10):
        dp[1][j] = 1
else:
    dp[1][int(S[0])] = 1

for i in range(1,N):
    amari = pow_mod(10,i)
    if S[i]=="?":
        for j in range(13):
            for k in range(10):
                dp[i+1][j] += dp[i][(j-amari*k)%mod]
            dp[i+1][j] %= mod2
    else:
        for j in range(13):
            dp[i+1][j] += dp[i][(j-amari*int(S[i]))%mod]
            dp[i+1][j] %= mod2

print(dp[N][5])
Buggy python submission (verdict: Runtime Error):
N, W = map(int, input().split())
w = [0]*N
v = [0]*N
for i in range(N):
    w[i], v[i] = map(int, input().split())
V = sum(v)

#dp[i][j]...i番目までの品物で価値j以上を達成するのに必要な重さの最小値(達成できないときはinf)
dp = [[float("inf")]*(V+1) for _ in range(N+1)]

for j in range(1,V+1):
    if j<=v[0]:
        dp[1][j] = w[0]

for i in range(2,N+1):
    for j in range(V+1):
        if j<v[i-1]:
            dp[i][j] = dp[i-1][j]
        else:
            dp[i][j] = min(dp[i-1][j],dp[i-1][j-v[i-1]+w[i-1]])

ans=0
#print(dp)
for i in range(N+1):
    for j in range(V+1):
        if dp[i][j] <= W:
            ans = j
            break

print(ans)




Fixed submission:
N, W = map(int, input().split())
w = [0]*N
v = [0]*N
for i in range(N):
    w[i], v[i] = map(int, input().split())
V = sum(v)

#dp[i][j]...i番目までの品物で価値j以上を達成するのに必要な重さの最小値(達成できないときはinf)
dp = [[float("inf")]*(V+1) for _ in range(N+1)]

"""
for j in range(V+1):
    if j<=v[0]:
        dp[1][j] = w[0]
"""
dp[0][0]=0
for i in range(1,N+1):
    for j in range(V+1):
        if j<v[i-1]:
            dp[i][j] = min(dp[i-1][j],w[i-1])
        else:
            dp[i][j] = min(dp[i-1][j],dp[i-1][j-v[i-1]]+w[i-1])

ans=0
#print(dp[-1])
for j in range(V+1):
    for i in range(N+1):
        if dp[i][j] <= W:
            ans = max(ans,j)
            break

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N, Ma, Mb = map(int, input().split())
a = [0]*N
b = [0]*N
c = [0]*N
INF = float("inf")


for i in range(N):
    a[i], b[i], c[i] = map(int, input().split())

#dp[i][j][k]...i番目までの品物で, タイプAの物質をjグラム, タイプBの物質をkグラム調達するのに必要な費用の最小値

dp = [[[INF]*400 for _ in range(400)] for _ in range(N+1)]
dp[0][0][0] = 0

for i in range(1, N+1):
    for j in range(400):
        for k in range(400):
            if j < a[i-1] or k < b[i-1]:
                dp[i][j][k] = dp[i-1][j][k]
            else:
                dp[i][j][k] = min(dp[i-1][j][k], dp[i-1][j-a[i-1]][k-b[i-1]]+c[i-1])

ans = INF

for i in range(1, N+1):
    for j in range(1, 400):
        for k in range(1, 400):
            if j*Mb == k*Ma:
                ans = min(ans, dp[i][j][k])
if ans == INF:
    print(-1)
else:
    print(ans)




Fixed submission:
N, Ma, Mb = map(int, input().split())
a = [0]*N
b = [0]*N
c = [0]*N
INF = 10000


for i in range(N):
    a[i], b[i], c[i] = map(int, input().split())

#dp[i][j][k]...i番目までの品物で, タイプAの物質をjグラム, タイプBの物質をkグラム調達するのに必要な費用の最小値

dp = [[[INF]*400 for _ in range(400)] for _ in range(N+1)]
dp[0][0][0] = 0

for i in range(1, N+1):
    for j in range(400):
        for k in range(400):
            if j < a[i-1] or k < b[i-1]:
                dp[i][j][k] = dp[i-1][j][k]
            else:
                dp[i][j][k] = min(dp[i-1][j][k], dp[i-1][j-a[i-1]][k-b[i-1]]+c[i-1])

ans = INF

for i in range(1, N+1):
    for j in range(1, 400):
        for k in range(1, 400):
            if j*Mb == k*Ma:
                ans = min(ans, dp[i][j][k])
if ans == INF:
    print(-1)
else:
    print(ans)
Buggy python submission (verdict: Runtime Error):
S = list(input())
ANS = 0
for i in range(len(S)//2):
    if S[i] != S[len(S)-i]:
        ANS += 1

print(ANS)

Fixed submission:
A, B, C = map(int, input().split())
if A + B + C >= 22:
  print("bust")
else:
  print("win")
Buggy python submission (verdict: Runtime Error):
N = int(input())
Mylist = list(input())
ANSlist = []
if N%2 == 1:
  print("No")
else: 
    for i in range(N/2):
        if Mylist[i] == Mylist[i + N/2]:
        ANSlist.append("Yes")
    if len(ANSlist) == N/2:
        print("Yes")

Fixed submission:
r = int(input())
print(r**2)
Buggy python submission (verdict: Runtime Error):
N = int(input())
Mylist = list(input())
ANSlist = []
if N%2 == 1:
  print("No")
else: 
  for i in range(N/2):
    if Mylist[i] == Mylist[i + N/2]:
      ANSlist.append("Yes")
  if len(ANSlist) == N/2:
    print("Yes")

Fixed submission:
N = int(input())
Mylist = list(input())
ANSlist = []
if N%2 == 1:
  print("No")
else: 
    for i in range(int(N/2)):
        if Mylist[i] == Mylist[i + int(N/2)]:
            ANSlist.append("Yes")
    if len(ANSlist) == N/2:
        print("Yes")
    else:
        print("No")
Buggy python submission (verdict: Runtime Error):
N = int(input())
Mylist = []
ANSlist = []
for i in range(N):
    a, b = map(int, input())
    Mylist.append([a,b])

for i in range(N):
    for j in range(i,j):
        length = ((abs(Mylist[i][1]-Mylist[j][1]))**2 + (abs(Mylist[i][0]-Mylist[j][0]))**2)**1/2
        ANSlist.append(length)

print(sum(ANSlist)/len(ANSlist))

Fixed submission:
N = int(input())
Mylist = []
ANSlist = []
for i in range(N):
    a, b = map(int, input().split())
    Mylist.append([a,b])

for i in range(N):
    for j in range(i,N):
        length = ((abs(Mylist[i][1]-Mylist[j][1]))**2 + (abs(Mylist[i][0]-Mylist[j][0]))**2)**(1/2)
        ANSlist.append(length)

way = N*(N-1)
anotherway = 2*(N-1)
print(anotherway*sum(ANSlist)/way)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
ANS = 0
harf = N//2
for i in range(harf):
    for j in range(N-harf,N):
        if i + j == N:
            ANS += 1

print(ANS)

Fixed submission:
N = int(input())
N = N-1
ANS = N//2
print(ANS)
Buggy python submission (verdict: Runtime Error):
N = int(input())

products = []

for i in range(1,10):
    for j in range(1,10):
        products.append(i*j)

if N in products:
    print("Yes")
else:
    print("No")

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

if A < 10 and B < 10:
    print(A*B)
else:
    print(-1)
Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
ANS = 0
Mylist = list(map(int, input().split()))
for i in range(N):
  if Mylist[i] >= K:
   	ANS += 1
print(ANS)

Fixed submission:
N = int(input())
if N%2 == 1:
  print((N+1)/2/N)
else:
  print(1/2)
Buggy python submission (verdict: Runtime Error):
from sys import stdin
n = int(stdin.readline().rstrip())
l = [int(x) for x in stdin.readline().rstrip().split()]
max = max(l)
sum = sum(l, -1*max)
print("Yes") if sum > max else print("No")

Fixed submission:
from sys import stdin
a, b = [int(x) for x in stdin.readline().rstrip().split()]
print(a/b)
Buggy python submission (verdict: Runtime Error):
bingo = [ input().split() for j in range(3)]
N = int(input())
b = []
for n in range(N):
	b.append(input())
count = 0
total = 0
p = 'No'
for x in range(N):
	for i in range(3):
		for j in range(3):
			count = count + 1
			if bingo[i][j] == b[x]:
				total = total + count
	count = 0
	if total == 6 or total == 12 or total == 15 or total == 18 or total == 24 or total == 33 or total == 36 or total == 27 or total == 30 or total == 39 or total == 31 or total == 25 or total == 32:
		p = 'Yes'
		break
print(p)

Fixed submission:
N = int(input())
print(int(N/2)+N%2)
Buggy python submission (verdict: Runtime Error):
S, T = raw_input().split()
A, B = map(int, raw_input().split())
U = raw_input()


if S == U:
	A -= 1
elif T == U:
	B -= 1

print A, B

Fixed submission:
S, T = raw_input().split()
A, B = map(int, raw_input().split())
U = raw_input()
if S == U:
	A -= 1
elif T == U:
	B -= 1
print A, B
Buggy python submission (verdict: Time Limit Exceeded):
s=input()
t=list(s)
u=sorted(list(set(t)))
ans=[]
for i in range(min(5,len(u))):
  ans.append(u[i])
k=int(input())
for j in range(1,min(5,len(t))):
  c=[]
  for i in range(len(t)-j):
    c.append(s[i:i+j+1])
    c=sorted(list(set(c)))
  for l in range(min(5,len(c))):
    ans.append(c[l])
ans=sorted(ans)
print(ans[k-1])


Fixed submission:
s=input()
t=list(s)
u=sorted(list(set(t)))
ans=[]
for i in range(len(u)):
  ans.append(u[i])
k=int(input())
for j in range(1,min(10,len(t))):
  for i in range(len(t)-j):
    ans.append(s[i:i+j+1])
ans=sorted(list(set(ans)))
print(ans[k-1])
Buggy python submission (verdict: Runtime Error):
for i in range(0,2*b2,2):
    for j in range(0,100,2):
        t[i][j]="#"
for i in range(0,2*b3,2):
        t[2*b2][i]="#"
print(100,100)
for i in range(50):
    print("".join(s[i]))
for i in range(50):
    print("".join(t[i]))

Fixed submission:
a,b=map(int,input().split())
s=[["#" for i in range(100)] for j in range(50)]
t=[["." for i in range(100)] for j in range(50)]

a2,a3=(a-1)//50,(a-1)%50
for i in range(0,2*a2,2):
    for j in range(0,100,2):
        s[i][j]="."
for i in range(0,2*a3,2):
    s[2*a2][i]="."

b2,b3=(b-1)//50,(b-1)%50
for i in range(2,2*b2+2,2):
    for j in range(0,100,2):
        t[i][j]="#"
for i in range(0,2*b3,2):
        t[2*b2+2][i]="#"
print(100,100)
for i in range(50):
    print("".join(s[i]))
for i in range(50):
    print("".join(t[i]))
Buggy python submission (verdict: Runtime Error):
n=int(input()
print(int(n//3))

Fixed submission:
n=int(input())
print(int(n//3))