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

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

Buggy submission (verdict: Runtime Error):
bingo = []
for i in range(3):
    array = list(map(int, input().strip().split()))
    bingo.append(array)

N = int(input())
number = []

for j in range(N):
    number.append(int(input()))

result = []
for n in range(N):
    for t in range(3):
        for y in range(3):
            if(bingo[t][y] == number[n]):
                result.append([t,y])

bingo_a = 'No'
t_a = 0
for r in range(len(result)):
    for t in range(3):
        for y in range(3):
            if(result[r][0] == t and result[r][1] == y):
                t_a += 1
        if(t_a == 3):
            bingo_a = 'Yes'

y_a = 0
for r in range(len(result)):
    for y in range(3):
        for t in range(3):
            if(result[r][0] == t and result[r][1] == y):
                y_a += 1
        if(y_a == 3):   
            bingo_a = 'Yes'

ans = 0
for rr in range(len(result)):
    if(result[rr][0] == 0 or result[rr][1] == 0):
        ans = ans + 1
    if(result[rr][1] == 1 or result[rr][1] == 1):
        ans = ans + 1
    if(result[rr][0] == 2 or result[rr][1] == 2):
        ans = ans + 1
if(ans == 3):
    bingo_a = 'Yes'

ans = 0
for rr in range(len(result)):
    if(result[rr][0] == 0 or result[rr][1] == 2):
        ans = ans + 1
    if(result[rr][1] == 1 or result[rr][1] == 1):
        ans = ans + 1
    if(result[rr][0] == 2 or result[rr][1] == 0):
        ans = ans + 1
if(ans == 3):
    bingo_a = 'Yes'

print(bingo_a)

Buggy submission (verdict: Runtime Error):
bingo = []
for i in range(3):
    array = list(map(int, input().strip().split()))
    bingo.append(array)

N = int(input())
number = []

for j in range(N):
    number.append(int(input()))

result = []
for n in range(N):
    for t in range(3):
        for y in range(3):
            if(bingo[t][y] == number[n]):
                result.append([t,y])

bingo_a = 'No'
for r in range(len(result)):
    for t in range(3):
        t_a = 0
        for y in range(3):
            if(result[r][0] == t or result[r][1] == y):
                t_a = t_a + 1
        if(t_a == 3):
            bingo_a = 'Yes'

for r in range(len(result)):
    for y in range(3):
        y_a = 0
        for t in range(3):
            if(result[r][0] == t or result[r][1] == y):
                y_a = y_a + 1
        if(y_a == 3):   
            bingo_a = 'Yes'

ans = 0
for rr in range(len(result)):
    if(result[rr][0] == 0 or result[rr][1] == 0):
        ans = ans + 1
    if(result[rr][1] == 1 or result[rr][1] == 1):
        ans = ans + 1
    if(result[rr][0] == 2 or result[rr][1] == 2):
        ans = ans + 1
if(ans == 3):
    bingo_a = 'Yes'

ans = 0
for rr in range(len(result)):
    if(result[rr][0] == 0 or result[rr][1] == 2):
        ans = ans + 1
    if(result[rr][1] == 1 or result[rr][1] == 1):
        ans = ans + 1
    if(result[rr][0] == 2 or result[rr][1] == 0):
        ans = ans + 1
if(ans == 3):
    bingo_a = 'Yes'

print(bingo_a)
print(result)
Problem p02829 (python)

Fixed submission:
print(6-int(input())-int(input()))

Buggy submission (verdict: Runtime Error):
a=int(intput())
b=int(intput())
print(6-a-b)

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(intput())
print(6-a-b)
Problem p02831 (python)

Fixed submission:
m,n=map(int,input().split())
def gcd(a,b):
	while(b):
		a,b=b,a%b; 
	return a;
def lcm(a,b):
	return(a*b)//gcd(a,b);
print(lcm(m,n))

Buggy submission (verdict: Runtime Error):
import math
a,b=map(int,input().split())
print((a*b)//math.gcd(a,b))
Problem p02753 (python)

Fixed submission:
a = input()
if "A" in a and "B" in a:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
s = input()
q_number = int(input())
reverse_flag = 1
head = ""
tail = ""
for i in range(q_number):
  temp = input().split()
  if temp[0] == "1": 
    reverse_flag = reverse_flag * -1
  else:
    headstails = int(temp[1])*reverse_flag 
    if headstails == 1 or headstails == -2:
      head = temp[2] + head
    else:
      tail = tail + temp[2]
      
if reverse_flag == 1:
  print(head+s+tail)
else:
  print(tail[::-1]+s[::-1]+head[::-1])

Buggy submission (verdict: Runtime Error):
s = input()
q_number = int(input())
reverse_flag = 1
for i in range(q_number):
  temp = input().split()
  if temp[0] == "1": 
    reverse_flag = reverse_flag * -1
  else:
    if int(temp[1])*reverse_flag == 1 or int(temp[1])*reverse_flag == -2:
      s = temp[2] + s
    else:
      s = s + temp[2]      
      
if reverse_flag == -1:
  s = s[::-1]
print(s)

Buggy submission (verdict: Runtime Error):
s = input()
q_number = int(input())
 
queries = [input().split() for dummy in range(q_number)]
flag = 1
count = 0
for i in range(q_number):
  if queries[i][0] == "1": 
    flag = flag * -1
    count += 1
  else:
    if int(queries[i][1])*flag == 1 or -2:
      s = queries[i][2] + s
    else:
      s = s + queries[i][2]      

      
if flag == -1:
  s = s[::-1]

print(s)
Problem p02897 (python)

Fixed submission:
a = int(input())

probability = 0.0
if a%2 == 0:
	probability = 0.5
else:
	probability = 1.0/float(a)*(int(a/2) + 1)
  
print(probability)

Buggy submission (verdict: Runtime Error):
a = map(int, input())

probability = 0.0
if a%2 == 0:
	probability = 0.5
else:
	probability = 1.0/float(a)*(a/2 + 1)
  
print(probability)

Buggy submission (verdict: Runtime Error):
a = map(int, input())

probability = 0.0
if a%2 == 0:
  probability = 0.5
else:
  probability = 1.0/float(a)*(a/2 + 1)
  
print(probability)

Buggy submission (verdict: Runtime Error):
a = map(int, input())

probability = 0
if a%2 == 0:
  probability = 0 
else:
  probability = 1.0/float(a)*(a/2 + 1)
  
print(probability)
Problem p02912 (python)

Fixed submission:
import math
import heapq

N, M = list(map(int, input().split()))
A = list(map(lambda a: -int(a), input().split()))
A.sort()
heapq.heapify(A)

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

amount = 0
for a in A:
  amount += math.floor(-a)
print(amount)

Buggy submission (verdict: Runtime Error):
import heapq

mnum, gnum = map(int, input().split())
array = list(map(lambda a: -int(a), input().split()))

array.sort()
heapq.heapify(array)

for i in range(gnum):
	temp = heapq.heappop(array)
	temp /= 2.0
	heapq.heappush(array, temp)
    
amount = 0
for a in array:
  amount += math.floor(-a)
print(amount)

Buggy submission (verdict: Runtime Error):
import heapq

mnum, gnum = map(int, input().split())
array = list(map(lambda a: -int(a), input().split()))

array.sort()
heapq.heapify(array)

for i in range(gnum):
	temp = heapq.heappop(array)
	temp = temp/2
	heapq.heappush(array, temp)
    
amount = 0
for a in array:
  amount += math.floor(-a)
print(amount)

Buggy submission (verdict: Runtime Error):
mnum, gnum = map(int, input().split())
array = list(map(int, input().split())

for i in range(gnum):
	array.sort()
	array[len(array)-1] = array[len(array)-1]/2

print(sum(array))
Problem p02916 (python)

Fixed submission:
num = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))
sum = 0
 
for i in range(num):
	if i == 0:
		sum += b[a[i]-1]
	else:
		sum += b[a[i]-1]
		if (a[i]-1) == a[i-1]:
			sum += c[a[i-1]-1]
 
print(sum)

Buggy submission (verdict: Runtime Error):
num = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))
sum = 0
 
for i in range(num):
	if i == 0:
		sum += b[a[i]-1]
	else:
		sum += b[a[i]-1]
		if (a[i]-1) == a[i-1]:
			sum += c[a[i-1]]
 
print(sum)

Buggy submission (verdict: Runtime Error):
num = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))
sum = 0

for i in range(num):
	if i == 0:
		sum += b[a[i]-1]
	else:
		sum += b[a[i]-1]
		if (a[i]-1) == a[i-1]:
			sum += c[a[i-1]]

print(sum)

Buggy submission (verdict: Runtime Error):
num = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))
sum = 0

for i in range(num):
	if i == 0:
		sum += b[a[i]-1]
	else:
		sum += b[a[i]-1]
		if (a[i]-1) == a[i-1]:
			sum += c[a[i-1]]

print(sum)

Buggy submission (verdict: Runtime Error):
num = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))
sum = 0

for i in range(num):
	if i == 0:
		sum += b[a[i]]
	else:
		sum += b[a[i]]
		if (a[i]-1) == a[i-1]:
			sum += c[i-1]

print(sum)
Problem p02835 (python)

Fixed submission:
s=list(map(int,input().split()))
if (s[0]+s[1]+s[2]>=22):
  print("bust")
else:
  print("win")

Buggy submission (verdict: Runtime Error):
s=list(map(int,input()))
if (s[0]+s[1]+s[2]>=22):
  print(bust)
else:
  print(win)
Problem p02847 (python)

Fixed submission:
s=input()
if(s=="SUN"):
  print(7)
if(s=="MON"):
  print(6)
if(s=="TUE"):
  print(5)
if(s=="WED"):
  print(4)
if(s=="THU"):
  print(3)
if(s=="FRI"):
  print(2)
if(s=="SAT"):
  print(1)

Buggy submission (verdict: Runtime Error):
cha=str(input())
if(cha==SUN):
  print(7)
if(cha==SAT):
  print(1)
if(cha==FRI):
  print(2)
if(cha==THR):
  print(3)
if(cha==WED):
  print(4)
if(cha==TUE):
  print(5)
if(cha==MON):
  print(6)
Problem p02859 (python)

Fixed submission:
m=int(input())
print(m * m)

Buggy submission (verdict: Runtime Error):
print(r ** r)

Buggy submission (verdict: Runtime Error):
m=input()
print(m*m)
Problem p02915 (python)

Fixed submission:
print(int(input())**3)

Buggy submission (verdict: Runtime Error):
print((input())**3)
Problem p02987 (python)

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

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

Buggy submission (verdict: Runtime Error):
s = list(input())
s.sort()

if len(set(s)) == 2 && s[0] == s[1] && s[2] == s[3]:
    print("Yes")
else:
    print("No")
Problem p02990 (python)

Fixed submission:
import math
def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
n,k = list(map(int, input().split()))

for i in range(1,k+1):
    if n-k+1 >= i:
        print(combinations_count(n-k+1,i)*combinations_count((k-i)+(i-1),(i-1)) % (10**9+7))
    else:
        print(0)

Buggy submission (verdict: Runtime Error):
import math
def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
n,k = list(map(int, input().split()))

for i in range(1,k+1):
    print(combinations_count(n-k+1,i)*combinations_count((k-i)+(i-1),(i-1)) % (10**9+7))
Problem p03038 (python)

Fixed submission:
n,m = list(map(int, input().split()))
a = list(map(int, input().split()))
bc = [list(map(int, input().split())) for _ in range(m)]
bc.sort(reverse = True, key = lambda x: x[1])
i = 0
counter = 0
while 1:
    for j in range(bc[i][0]):
        a.append(bc[i][1])
        counter += 1
        if counter == n:
            break
    if counter == n or i == len(bc)-1:
        break
    i += 1

a.sort(reverse = True)
print(sum(a[:n]))

Buggy submission (verdict: Runtime Error):
n,m = list(map(int, input().split()))
a = list(map(int, input().split()))
bc = [list(map(int, input().split())) for _ in range(m)]
bc.sort(reverse = True, key = lambda x: x[1])
i = 0
counter = 0
while 1:
    for j in range(bc[i][0]):
        a.append(bc[i][1])
        counter += 1
        if counter == n:
            break
    if counter == n:
        break
    i += 1

a.sort(reverse = True)
print(sum(a[:n]))
Problem p03041 (python)

Fixed submission:
import sys
n,k = list(map(int, input().split()))
s = list(input())

if s[k-1] == "A":
    s[k-1] = "a"
elif s[k-1] == "B":
    s[k-1] = "b"
else:
    s[k-1] = "c"

print("".join(s))

Buggy submission (verdict: Runtime Error):
import sys
n,k = list(map(int, input().split()))
s = input()

if s[k-1] == "A":
    s[k-1] = "a"
elif s[k-1] == "B":
    s[k-1] = "b"
else:
    s[k-1] = "c"

print(s)
Problem p03835 (python)

Fixed submission:
k,s= list(map(int, input().split()))
count=0
for x in range(k+1):
    for y in range(k+1):
            if 0<=s-x-y <=k:
                count+=1
print(count)

Buggy submission (verdict: Runtime Error):
#include <iostream>
#include <string>
#include <vector>
#include <string.h>
#include <algorithm>

using namespace std;


int main(){
  int n;
  cin >> k >> s;
  count=0;
  for(int x=0; x<<k+1; x++){
    for(int y=0; y<<k+1; y++){
      for(int z=0; z<<k+1; z++){
        if(x+y+z==s){
          count++;
        }
      }  
    }
  }
  cout << count << endl;
  return 0;
}

Buggy submission (verdict: Runtime Error):
k,s= list(map(int, input().split()))
count=0
for x in range(k+1):
    for y in range(k+1):
        for z in range(k+1):
            if x+y+z=s:
                count+=1
print(count)
Problem p02831 (python)

Fixed submission:
import fractions

def main():
    a, b = map(int, input().split())

    print(a*b//fractions.gcd(a, b))

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
import math

def main():
    a, b = map(int, input().split())

    print(a*b//math.gcd(a, b))

if __name__ == '__main__':
    main()
Problem p02912 (python)

Fixed submission:
import sys
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline

import numpy as np

def main():
    n, m = map(int, input().split())
    a = np.array([int(i) for i in input().split()])
    a.sort()

    while True:
        temp = a[-1]//2
        a[-1] //= 2
        a.sort()
        ind = np.where(a==temp)[0][0]
        m -= 1
        if m == 0:
            print(np.sum(a))
            break
        elif n - ind < m:
            a[ind:] = a[ind:]//2
            a.sort()
            m = m - (n-ind)
        else:
            a[-m:] = a[-m:]//2
            print(np.sum(a))
            break

main()

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

import numpy as np

def main():
    n, m_num = map(int, input().split())
    a_list = np.array([int(i) for i in input().split()])
    a_list.sort()

    def func(a, m):
        temp = a[-1]//2
        a[-1] = temp
        a.sort()
        ind = np.where(a==temp)[0][0]
        m -= 1
        if m == 0:
            print(np.sum(a))
        elif n - ind < m:
            a[a>=temp] = a[a>=temp]//2
            a.sort()
            m = m - (n-ind)
            if m>0:
                func(a, m)
            else:
                print(np.sum(a))
        else:
            a[-m:] = a[-m:]//2
            print(np.sum(a))

    func(a_list, m_num)

main()

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

import numpy as np

def main():
    n, m_num = map(int, input().split())
    a_list = np.array([int(i) for i in input().split()])
    a_list.sort()

    def func(a, m):
        temp = a[-1]//2
        a[-1] = temp
        a.sort()
        ind = np.where(a==temp)[0][0]
        m -= 1
        if m == 0:
            print(np.sum(a))
        elif n - ind < m:
            a[a>=temp] = a[a>=temp]//2
            a.sort()
            m = m - (n-ind)
            if m>0:
                func(a, m)
            else:
                print(np.sum(a))

        else:
            a[-m:] = a[-m:]//2
            print(np.sum(a))

    func(a_list, m_num)

main()
Problem p02951 (python)

Fixed submission:
def main():
    a = list(map(int, input().split()))
    print(max(a[2] - (a[0] - a[1]), 0))
main()

Buggy submission (verdict: Runtime Error):
def main():
    a = list(map(int, input().split()))
    print(max(a[2] - (a[0] - a[1], 0))

main()
Problem p02754 (python)

Fixed submission:
n, a, b = map(int, input().split())
s_len = a+b
ret = 0
ret = n // s_len * a
if n % s_len < a:
  ret += n% s_len
else:
  ret += a
print(ret)

Buggy submission (verdict: Runtime Error):
n, a, b = map(int, input().split())
s = 'b'*a + 'r'*b
s_len = len(s)
ret = 0
ret = n // s_len * a
if n % s_len < a:
  ret += n% s_len
else:
  ret += a
print(ret)
Problem p03013 (python)

Fixed submission:
N, M = map(int, input().split())
a = [False] * (N+1)
for i in range(M):
    a[int(input())] = True
 
memo = [None] * (N+1)
memo[0] = 1 #0番目にたどり着く方法は1通りと定義する。
memo[1] = 1 if not a[1] else 0
 
for i in range(2, N+1):
    memo[i] = memo[i-1] + memo[i-2] if not a[i] else 0
 
print(memo[N] % 1000000007)

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
a = [False] * (N+1)
for i in range(M):
    a[int(input())] = True

memo = [None] * (N+1)
memo[0] = 0 #0番目にたどり着く方法は0通りと定義する。
memo[1] = 1 if not a[1] else 0
if a[2] != True:
  if memo[1] == 0:
    memo[2] = 1
  else:
    memo[2] = 2
else:
  memo[2] = 0

for i in range(3, N+1):
    memo[i] = memo[i-1] + memo[i-2] if not a[i] else 0

print(memo[N] % 1000000007)

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
a = [int(input()) for i in range(M)]

def d(n: int) -> int:
    if n == N or n == N-1:
        return 1
    
    if not(n+1 in a) and not(n+2 in a):
        return d(n+1) + d(n+2)
    elif n+1 in a and not (n+2 in a):
        return d(n+2)
    else:
        return d(n+1)

flag = 0
for i in range(M-1):
    if a[i] == a[i+1]:
        flag = 1
        break
        
if flag == 1:
    print(0)
else:
    print(d(0) % 1000000007)
Problem p02771 (python)

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

if a == b and a != c:
    print("Yes")
elif a == c and a != b:
    print("Yes")
elif b == c and a != b:
    print("Yes")
else:
    print("No")

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

if a == b and a != c:
    print("Yes")
elif a == c and a != b:
    print("Yes")
elif b == c and a != b:
    print("Yes")
ese:
    print("No")
Problem p02897 (python)

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

Buggy submission (verdict: Runtime Error):

if a%2 == 0:
    print("0.5")
else:
    print((a//2+1)/a)
Problem p03013 (python)

Fixed submission:
N, M = map(int, input().split())
a = [0]*M
for i in range(M):
    a[i] = int(input())

now = 0
ans = 1
j = 0
for i in range(M):
    if now == a[i] - 1:
       now = a[i] + 1 
    elif now == a[i]:
        ans = 0
        break
    else:
        j = (a[i] - 1) - now
        k1 = 0
        k2 = 1
        k3 = 1
        for n in range(j):
            k3 = k2
            k2 += k1
            k1 = k3
        ans *= k2
        now = a[i] + 1
if ans > 0:
  j = N - now
  k1 = 0
  k2 = 1
  k3 = 1
  for n in range(j):
      k3 = k2
      k2 += k1
      k1 = k3
  ans *= k2
print(ans % 1000000007)

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
a = [0]*M
for i in range(M):
    a[i] = int(input())

now = 0
ans = 1
j = 0
for i in range(M):
    if now == a[i] - 1:
       now = a[i] + 1 
    elif now == a[i]:
        ans = 0
        break
    else:
        j = (a[i] - 1) - now
        k1 = 0
        k2 = 1
        k3 = 1
        for n in range(j):
            k3 = k2
            k2 += k1
            k1 = k3
        ans *= k2
        now = a[i] + 1

j = N - now
k1 = 0
k2 = 1
k3 = 1
for n in range(j):
    k3 = k2
    k2 += k1
    k1 = k3
ans *= k2
now = a[i] + 1
print(ans % 1000000007)
Problem p02831 (python)

Fixed submission:
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

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

def main():
    A,B = map(int, input().split())
    print(lcm(A,B))

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
import math

def main():

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

    A,B = map(int, input().split())
    print(lcm(A,B))

if __name__ == '__main__':
    main()
Problem p02990 (python)

Fixed submission:
# 組み合わせの計算は下記サイトから引用
# https://qiita.com/derodero24/items/91b6468e66923a87f39f#%E7%95%AA%E5%A4%96%E7%B7%A8
def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

mod = 10**9+7 #出力の制限
N = 10**4
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

for i in range( 2, N + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )

N,K=map(int, input().split())
R=N-K

for i in range(1,K+1):
    if N-K+1<i or K-1<i-1:
        print(0)
    else:
        print(cmb(R+1,i,mod) * cmb(K-1,i-1,mod) % mod)

Buggy submission (verdict: Runtime Error):
from math import factorial
def ncr(n,r):
    return int((factorial(n)) / (factorial(r)) / (factorial(n - r)))

DIV=10**9+7

N,K=map(int, input().split())
R=N-K
for i in range(1,K+1):
    print(ncr(R+1, i) * ncr(K-1,i-1) % DIV)
Problem p02754 (python)

Fixed submission:
n, a, b = list(map(int, input().split()))
if a != 0:
    c1 = n // (a + b)
    c2 = n - ((a + b) * c1)
    print(a * c1 + (c2 if c2 < a else a))
else:
    print("0")

Buggy submission (verdict: Runtime Error):
def findB(tmp):
    count = 0
    for i in tmp:
        if i == "b":
            count += 1
    return count


n, a, b = list(map(int, input().split()))
if a != 0:
    tmp = "b" * a + "r" * b
    all_str = tmp
    while True:
        if len(all_str) >= n:
            break
        all_str = all_str + tmp
    print(findB(all_str[:n]))
else:
    print("0")
Problem p02759 (python)

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

Buggy submission (verdict: Runtime Error):
import numpy as np
from scipy.sparse.csgraph import shortest_path
N, M, K = tuple(map(int, input().split()))
friends = [list(map(int, input().split())) for _ in range(M)]
blocks = [list(map(int, input().split())) for _ in range(K)]

friend_matrix = np.zeros((N, N))

for friend in friends:
	friend_matrix[friend[0]-1, friend[1]-1] = 1
	friend_matrix[friend[1]-1, friend[0]-1] = 1

# matrix for direct friendship between 2
# print('friend_matrix')
# print(friend_matrix)

# matrix for friendship distance
friend_distance = shortest_path(friend_matrix)
# print('friend_distance')
# print(friend_distance)

def is_friend_candidate(a, b):
	if a == b:
		return False
	for block in blocks:
		if block == [a, b] or block == [b, a]:
			return False
	for friend in friends:
		if friend == [a, b] or friend == [b, a]:
			return False
	if friend_distance[a-1, b-1] == np.inf:
		return False
	return True

candidate_matrix = np.zeros((N, N))
for i in range(N):
	for other in range(N):
		if candidate_matrix[i, other] == 1:
			continue
		if is_friend_candidate(i+1, other+1):
			candidate_matrix[i, other] = 1
			candidate_matrix[other, i] = 1

# matrix for friendship candidate
# print('candidate_matrix')
# print(candidate_matrix)

# atcoder numpy is outdated
# print(np.__version__)
# candidate_counts = np.count_nonzero(candidate_matrix == 1, axis=0)
candidate_counts = []
for row in candidate_matrix:
	candidate_counts.append(np.count_nonzero(row == 1))

# print('candidate_counts')
# print(candidate_counts)
print(' '.join(map(str, candidate_counts)))

Buggy submission (verdict: Runtime Error):
N = input()
if N % 2 == 1:
	n = N + 1
else:
	n = N
print(int(n / 2))

Buggy submission (verdict: Runtime Error):
N = input()
if N % 2 == 1:
	n = N + 1
else:
	n = N
print(n / 2)
Problem p03135 (python)

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

Buggy submission (verdict: Runtime Error):
a,b = map(int,input()split())
print(a/b)