Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = [0]*N
for i in range(N):
    A[i] = int(input())

for i in range(N):
    print(max(A[:i]+A[i+1:]))


Fixed submission:
import heapq
N = int(input())
A = [None]*N
for i in range(N):
    A[i] = {
        "index": i,
        "value": int(input())
    }

B = heapq.nlargest(2, A, key=lambda e:e["value"])
for i in range(N):
    if i == B[0]["index"]:
        print(B[1]["value"])
    else:
        print(B[0]["value"])

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = [0]*N
for i in range(N):
    A[i] = int(input())

for i in range(N):
    print(max(A[:i]+A[i+1:]))


Fixed submission:
import heapq
N = int(input())
A = [None]*N
for i in range(N):
    A[i] = {
        "index": i,
        "value": int(input())
    }

B = heapq.nlargest(2, A, key=lambda e:e["value"])
for i in range(N):
    if i == B[0]["index"]:
        print(B[1]["value"])
    else:
        print(B[0]["value"])
Buggy python submission (verdict: Runtime Error):
import math
def combinatorial(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))

N, K = (int(x) for x in input().split())
for i in range(1, K+1):
    ans = combinatorial(K-1, i-1)*combinatorial(N-K+1, i)%(10**9+7)
    print(ans)


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

N, K = (int(x) for x in input().split())
for i in range(1, K+1):
    if N-K+1 >= i:
        ans = combinatorial(K-1, i-1)*combinatorial(N-K+1, i)%(10**9+7)
    else:
        ans = 0
    print(ans)
Buggy python submission (verdict: Runtime Error):
def function(n):
    if n <= 1:
        return 1
    else:
        return function(n-1) + function(n-2)

N, M = (int(x) for x in input().split())
a = [-1]
for i in range(M):
    a.append(int(input()))

a.append(N+1)
ans = 1
for i in range(M+1):
    length = a[i+1] - a[i] - 1
    if length == 0:
        print(0)
        exit()
    else:
        ans *= function(length-1)

print(ans%(10**9+7))


Fixed submission:
N, M = (int(x) for x in input().split())
F = [0,1]
for i in range(N):
    F.append(F[i]+F[i+1])

a = [-1]
for i in range(M):
    a.append(int(input()))

a.append(N+1)
ans = 1
for i in range(M+1):
    length = a[i+1] - a[i] - 1
    if length == 0:
        print(0)
        exit()
    else:
        ans *= F[length]

print(ans%(10**9+7))
Buggy python submission (verdict: Time Limit Exceeded):
N, M = (int(x) for x in input().split())
L, R = [None]*M, [None]*M
for i in range(M):
    L[i], R[i] = (int(x) for x in input().split())

tmp = set(range(L[0], R[0]+1))
for j in range(1, M):
    tmp = tmp & set(range(L[j], R[j]+1))

print(len(tmp))


Fixed submission:
N, M = (int(x) for x in input().split())
L, R = [None]*M, [None]*M
for i in range(M):
    L[i], R[i] = (int(x) for x in input().split())

tmp = [L[0], R[0]]
for j in range(1, M):
    if tmp[0] < L[j]:
        tmp[0] = L[j]
    if R[j] < tmp[1]:
        tmp[1] = R[j]
    if tmp[0] > tmp[1]:
        print(0)
        exit()

print(tmp[1]-tmp[0]+1)
Buggy python submission (verdict: Runtime Error):
def function(S):
    ACGT = ['A', 'C', 'G, 'T']
    ret = 0
    N = len(S)
    for i in range(0, N):
        for j in range(i+1, N+1):
            temp = 0
            l = S[i:j]
            for x in l:
                if x not in ACGT:
                    break
            temp = len(l)
    	if temp >= ret:
        	ret = temp
    return ret

Fixed submission:
def function(S):
    ACGT = ['A', 'C', 'G', 'T']
    ret = 0
    N = len(S)
    for i in range(0, N):
        for j in range(i+1, N+1):
            temp = 0
            l = S[i:j]
            const = 0
            for x in l:
                if x not in ACGT:
                    const = 1
                    break
            if const == 1:
                break
            temp = len(l)
            if temp >= ret:
                ret = temp
    return ret

S = input()
print(function(S))

Buggy python submission (verdict: Runtime Error):
def function(S):
    ACGT = ['A', 'C', 'G, 'T']
    ret = 0
    N = len(S)
    for i in range(0, N):
        for j in range(i+1, N+1):
            l = S[i:j]
            for x in l:
                if x not in ACGT:
                    break
            ret = len(l)
    return ret

Fixed submission:
def function(S):
    ACGT = ['A', 'C', 'G', 'T']
    ret = 0
    N = len(S)
    for i in range(0, N):
        for j in range(i+1, N+1):
            temp = 0
            l = S[i:j]
            const = 0
            for x in l:
                if x not in ACGT:
                    const = 1
                    break
            if const == 1:
                break
            temp = len(l)
            if temp >= ret:
                ret = temp
    return ret

S = input()
print(function(S))
Buggy python submission (verdict: Time Limit Exceeded):
S = input()
N, ans, i = len(S), 0, 0
while i < N:
    if S[i+1:i+2] != '' and S[i:i+1] != S[i+1:i+2]:
        S = S[0:i] + S[i+2:N]
        ans, i, N = ans + 2, 0, N - 2
    else:
        i += 1
print(ans)

Fixed submission:
S = input()
N, counter_zero, counter_one = len(S), 0, 0
for i in range(N):
    if S[i:i+1] == '0':
        counter_zero += 1
    elif S[i:i+1] == '1':
        counter_one += 1
ans = 2 * min(counter_zero, counter_one)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = [int(x) for x in input().split()]
B = sorted([A[i]-i for i in range(N)])
# return -A[0]-...-A[k-1]+A[k]+...+A[N-1]
def partial_sum(k):
    return -sum(B[:k]) + sum(B[k:])

l = [partial_sum(i) -(N-2*i)*B[i] for i in range(N)]
print(min(l))


Fixed submission:
N = int(input())
A = [int(x) for x in input().split()]
B = sorted([A[i]-i for i in range(N)])
b = B[(N-1)//2] if N % 2 != 0 else (B[N//2-1]+B[N//2])//2
print(sum(abs(B[i]-b) for i in range(N)))
Buggy python submission (verdict: Runtime Error):
from math import sqrt 

n = int(input())

x = int(sqrt(n))
if n == 2:
    print(0)
    exit()
ans = n-1
for i in range(2, x+1):
    y = dt = n//i
    while n//dt == n//y and n%y <= n//y:
        if n//y == n%y:
            ans += y
            break
        y -= 1
        if y == 1:
            break
        # print x,y,ans
print(ans)

Fixed submission:
a,b=map(int,raw_input().split())
print a-b+1
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [int(_) for _ in input().split()]
ans = []
a.append(0)
a.sort()

if a.index(0) == 0:
    x = a.pop(1)
    y = a.pop()
    tmp = x-y
    ans.append([x,y])
    a.append(tmp)
    a.sort()
elif a.index(0) == n-1:
    x = a.pop(-2)
    y = a.pop(0)
    tmp = x-y
    ans.append([x,y])
    a.append(tmp)
    a.sort()

a.remove(0)
if len(a) == 1:
    print(a[0])
    print(ans[0][0], ans[0][1])
else:
    maximum = a.pop()
    minimum = a.pop(0)
    while len(a) > 0:
        x = a.pop()
        if x > 0:
            ans.append([minimum, x])
            minimum -= x
        else:
            ans.append([maximum, x])
            maximum -= x

    m = maximum-minimum
    print(m)
    ans.append([maximum, minimum])
    for i in ans:
        print(i[0], i[1])

Fixed submission:
n = int(input())
a = [int(_) for _ in input().split()]
ans = []
a.append(0)
a.sort()

if a.index(0) == 0:
    x = a.pop(1)
    y = a.pop()
    tmp = x-y
    ans.append([x,y])
    a.append(tmp)
    a.sort()
elif a.index(0) == n:
    x = a.pop(-2)
    y = a.pop(0)
    tmp = x-y
    ans.append([x,y])
    a.append(tmp)
    a.sort()

a.remove(0)
if len(a) == 1:
    print(a[0])
    print(ans[0][0], ans[0][1])
else:
    maximum = a.pop()
    minimum = a.pop(0)
    while len(a) > 0:
        x = a.pop()
        if x > 0:
            ans.append([minimum, x])
            minimum -= x
        else:
            ans.append([maximum, x])
            maximum -= x

    m = maximum-minimum
    print(m)
    ans.append([maximum, minimum])
    for i in ans:
        print(i[0], i[1])

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [int(_) for _ in input().split()]
ans = []
a.append(0)
a.sort()

if a.index(0) == 0:
    x = a.pop(1)
    y = a.pop()
    tmp = x-y
    ans.append([x,y])
    a.append(tmp)
    a.sort()
elif a.index(0) == n-1:
    x = a.pop(-2)
    y = a.pop(0)
    tmp = x-y
    ans.append([x,y])
    a.append(tmp)
    a.sort()

a.remove(0)

maximum = a.pop()
minimum = a.pop(0)
while len(a) > 0:
    x = a.pop()
    if x > 0:
        ans.append([minimum, x])
        minimum -= x
    else:
        ans.append([maximum, x])
        maximum -= x

m = maximum-minimum
print(m)
ans.append([maximum, minimum])
for i in ans:
    print(i[0], i[1])


Fixed submission:
n = int(input())
a = [int(_) for _ in input().split()]
ans = []
a.append(0)
a.sort()

if a.index(0) == 0:
    x = a.pop(1)
    y = a.pop()
    tmp = x-y
    ans.append([x,y])
    a.append(tmp)
    a.sort()
elif a.index(0) == n:
    x = a.pop(-2)
    y = a.pop(0)
    tmp = x-y
    ans.append([x,y])
    a.append(tmp)
    a.sort()

a.remove(0)
if len(a) == 1:
    print(a[0])
    print(ans[0][0], ans[0][1])
else:
    maximum = a.pop()
    minimum = a.pop(0)
    while len(a) > 0:
        x = a.pop()
        if x > 0:
            ans.append([minimum, x])
            minimum -= x
        else:
            ans.append([maximum, x])
            maximum -= x

    m = maximum-minimum
    print(m)
    ans.append([maximum, minimum])
    for i in ans:
        print(i[0], i[1])
Buggy python submission (verdict: Time Limit Exceeded):
n,m = map(int, input().split())
l, r = [], []
c = 0

a = []
for _ in range(n):
    a.append(0)

for _ in range(m):
    l,r = map(int, input().split())
    for i in range(l-1, r):
        a[i] += 1
        
for i in range(n):
    if a[i] == m:
        c += 1

print(c)


Fixed submission:
n,m = map(int, input().split())
l, r = [], []
x = 0
c = 0

a = []
for _ in range(n):
    a.append(0)

for _ in range(m):
    l,r = map(int, input().split())
    a[l-1] += 1
    if r != n:
        a[r] -= 1

for i in range(n):
    x += a[i]
    if(x == m):
        c += 1

print(c)
Buggy python submission (verdict: Runtime Error):
a,b = input()
if a=="H" and b=="H" or a=="D" and b=="D":
    print("H")
else:
    print("D")


Fixed submission:
a,b = input().split()
if a==b=="H" or a==b=="D":
    print("H")
else:
    print("D")

Buggy python submission (verdict: Runtime Error):
a,b = input()
if a==b=="H" or a==b=="D":
    print("H")
else:
    print("D")


Fixed submission:
a,b = input().split()
if a==b=="H" or a==b=="D":
    print("H")
else:
    print("D")

Buggy python submission (verdict: Runtime Error):
a,b = input()
if a==b=="H" or a==b=="D":
    print("H")
else:
    print("D")


Fixed submission:
a,b = input().split()
if a==b=="H" or a==b=="D":
    print("H")
else:
    print("D")

Buggy python submission (verdict: Runtime Error):
#HonestOrDishonest
a,b = input()
if a==b=="H" or a==b=="D":
    print("H")
else:
    print("D")


Fixed submission:
a,b = input().split()
if a==b=="H" or a==b=="D":
    print("H")
else:
    print("D")
Buggy python submission (verdict: Time Limit Exceeded):
S = input()
G = [1 if s == "R" else -1 for s in S]

memo = [None, None]
pos = [1] * len(G)

for i in range(10 ** 100):
  new_pos = [0] * len(G)
  for j, n in enumerate(pos):
    new_pos[j + G[j]] += n
  pos = new_pos
  if i > 1:
    if pos == memo[0]:
      if i % 2 == 1:
        print(" ".join([str(x) for x in pos]))
      else:
        print(" ".join([str(x) for x in memo[1]]))
      break
  memo[0] = memo[1]
  memo[1] = pos

Fixed submission:
S = input()
l, r = 0, len(S)

memo = [0] * len(S)

for i in range(len(S) - 1):
  if S[i] == "R" and S[i + 1] == "L":
    n = (i - l) // 2
    memo[i] = n + 1
    memo[i + 1] = (i - l - n) + 1
    l = i + 2
  if S[i] == "L" and S[i + 1] == "R":
    n = (i + 1 - l) // 2
    memo[l - 1] += n
    memo[l - 2] += i + 1 - l - n
    l = i + 1
if l < r:
  n = (r - l) // 2
  memo[l - 1] += n
  memo[l - 2] += r - l - n

print(" ".join([str(x) for x in memo]))
Buggy python submission (verdict: Runtime Error):
import datetime
 
t = datetime.datetime.strptime(input(), "%Y/%m/%d")
if t < (year=2019, month=5, day=1):
    print("Heisei")
else:
    print("TBD")

Fixed submission:
import datetime
 
t = datetime.datetime.strptime(input(), "%Y/%m/%d")
if t < datetime.datetime(year=2019, month=5, day=1):
    print("Heisei")
else:
    print("TBD")

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

t = datetime.datetime.strptime(input(), "%Y/%m/%d")
if t < (year=2019, month=5, day=1):
    print("Heisei")
else:
  	print("TBD")


Fixed submission:
import datetime
 
t = datetime.datetime.strptime(input(), "%Y/%m/%d")
if t < datetime.datetime(year=2019, month=5, day=1):
    print("Heisei")
else:
    print("TBD")
Buggy python submission (verdict: Runtime Error):
N.i=map(int,input().split())
print(N-i+1)

Fixed submission:
N,i=map(int,input().split())
print(N-i+1)
Buggy python submission (verdict: Time Limit Exceeded):
import sys
def input(): return sys.stdin.readline().strip()

i  = lambda: int(input())
li = lambda: list(map(int, input().split()))

N = i()
A = li()

D = [0] * N

full_mount = sum(A)
for i in range(0, N):
    t = full_mount
    for j in range(i + 1, N , 2):
        t -= A[j] * 2
    for j in range(i - 2, -1, -2):
        t -= A[j] * 2
    D[i] = str(t)

print(' '.join(D))

Fixed submission:
import sys
def input(): return sys.stdin.readline().strip()

i  = lambda: int(input())
li = lambda: list(map(int, input().split()))

N = i()
A = li()

D = [0] * N

D[0] = sum(A)
for i in range(1, N , 2):
    D[0] -= A[i] * 2

for i in range(1, N):
    D[i] = A[i-1] * 2 - D[i-1]

print(' '.join(map(str, D)))
Buggy python submission (verdict: Runtime Error):
import sys
def input(): return sys.stdin.readline().strip()
def prime_factors(n):
    i = 2
    factors = {}
    while i * i <= n:
        if n % i:
            i += 1
        else:
            n //= i
            if i in factors.keys():
                factors[i] += 1
            else:
                factors[i] = 1
    if n > 1:
        if n in factors.keys():
            factors[n] += 1
        else:
            factors[n] = 1
    return factors

i  = lambda: int(input())

N = i()

pfd = prime_factors(N)

check_num = []

for pf in pfd.keys():
    tmp_num = []
    for i in range(1, pfd[pf] + 1):
        tmp_num.append(pf ** i)
        for n in check_num:
            tmp_num.append(n * (pf ** i))
    check_num += tmp_num

count = 0
for n in check_num:
    if N // (n-1) == N % (n-1):
        count += n-1

print(count)

Fixed submission:
import sys
def input(): return sys.stdin.readline().strip()

mi = lambda: map(int, input().split())

M, N = mi()

print(M-N+1)
Buggy python submission (verdict: Runtime Error):
import sys
import sympy
def input(): return sys.stdin.readline().strip()

i  = lambda: int(input())

N = i()

pfd = sympy.factorint(N)

check_num = []

for pf in pfd.keys():
    tmp_num = []
    for i in range(1, pfd[pf] + 1):
        tmp_num.append(pf ** i)
        for n in check_num:
            tmp_num.append(n * (pf ** i))
    check_num += tmp_num

count = 0
for n in check_num:
    if N / n < n:
        count += n-1

print(count)

Fixed submission:
import sys
def input(): return sys.stdin.readline().strip()
def prime_factors(n):
    i = 2
    factors = {}
    while i * i <= n:
        if n % i:
            i += 1
        else:
            n //= i
            if i in factors.keys():
                factors[i] += 1
            else:
                factors[i] = 1
    if n > 1:
        if n in factors.keys():
            factors[n] += 1
        else:
            factors[n] = 1
    return factors

i  = lambda: int(input())

N = i()

pfd = prime_factors(N)

check_num = []

for pf in pfd.keys():
    tmp_num = []
    for i in range(1, pfd[pf] + 1):
        tmp_num.append(pf ** i)
        for n in check_num:
            tmp_num.append(n * (pf ** i))
    check_num += tmp_num

count = 0
for n in check_num:
    if N // (n-1) == N % (n-1):
        count += n-1

print(count)
Buggy python submission (verdict: Time Limit Exceeded):
N,M = list(map(int, input().split()))
AB_array = []
for _ in range(N):
    AB_array.append(list(map(int, input().split())))

count = 0
while True:
    select = 0
    min_val = AB_array[0][0]
    for i in range(1,len(AB_array)):
        if AB_array[i][0] < min_val:
            min_val = AB_array[i][0]
            select = i
    if M <= AB_array[select][1]:
        count += AB_array[select][0] * M
        break
    else:
        M -= AB_array[select][1]
        count += AB_array[select][0] * AB_array[select][1]
        AB_array.pop(select)

print(count)


Fixed submission:
N,M = list(map(int, input().split()))
AB_array = []
for _ in range(N):
    AB_array.append(list(map(int, input().split())))

AB_array_s = sorted(AB_array, key=lambda x: x[0])

count = 0
for i in range(len(AB_array_s)):
    A,B = AB_array_s[i]
    if M <= B:
        count += A * M
        break
    else:
        M -= B
        count += A * B

print(count)
Buggy python submission (verdict: Runtime Error):
import sys
if __name__ == '__main__':
    N = int(input())
    W = [str(input()) for _ in range(N)]
    for i in range(1,N):
        if W[i-1][-1] != W[i][0]:
            print('No')
            sys.exit(0)
    print('Yes')

Fixed submission:
if __name__ == '__main__':
    AB = [int(n) for n in input().split()]
    if AB[0] * AB[1] % 2 == 0:
        print('No')
    else:
        print('Yes')

Buggy python submission (verdict: Runtime Error):
import sys
if __name__ == '__main__':
    N = int(input())
    W = [int(input()) for _ in range(N)]
    for i in range(1,N):
        if W[i-1][-1] != W[i][0]:
            print('No')
            sys.exit(0)
    print('Yes')

Fixed submission:
if __name__ == '__main__':
    AB = [int(n) for n in input().split()]
    if AB[0] * AB[1] % 2 == 0:
        print('No')
    else:
        print('Yes')
Buggy python submission (verdict: Runtime Error):
import sys
if __name__ == '__main__':
    N = int(input())
    W = [int(input()) for _ in range(N)]
    for i in range(1,N):
        if W[i-1][-1] != W[i][0]:
            print('No')
            sys.exit()
    print('Yes')

Fixed submission:
import sys
if __name__ == '__main__':
    N = int(input())
    W = [str(input()) for _ in range(N)]
    if len(W) != len(set(W)):
        print('No')
        sys.exit(0)
    for i in range(1,N):
        if W[i-1][-1] != W[i][0]:
            print('No')
            sys.exit(0)
    print('Yes')

Buggy python submission (verdict: Runtime Error):
import sys
if __name__ == '__main__':
    N = int(input())
    W = [int(input()) for _ in N]
    for i in range(1,N):
        if W[i-1][-1] != W[i][0]:
            print('No')
            sys.exit()
    print('Yes')

Fixed submission:
import sys
if __name__ == '__main__':
    N = int(input())
    W = [str(input()) for _ in range(N)]
    if len(W) != len(set(W)):
        print('No')
        sys.exit(0)
    for i in range(1,N):
        if W[i-1][-1] != W[i][0]:
            print('No')
            sys.exit(0)
    print('Yes')
Buggy python submission (verdict: Runtime Error):
import sys
import functools
import math
if __name__ == '__main__':
    NX = [int(n) for n in input().split()]
    X = [int(n) for n in input().split()]
    if len(X) == 1:
        print(abs(X[0]-NX[1]))
        sys.exit(0)
    X.append(NX[1])
    X.sort()
    diff = [X[i] - X[i-1] for i in range(1, len(X))]
    D = functools.reduce(math.gcd, diff)
    print(D)
    # D = min(diff)
    # while any(np.array(diff)%D):
    #     D -= 1
    # print(D)

Fixed submission:
import sys
import functools
import fractions

if __name__ == '__main__':
    NX = [int(n) for n in input().split()]
    X = [int(n) for n in input().split()]
    if len(X) == 1:
        print(abs(X[0]-NX[1]))
        sys.exit(0)

    X.append(NX[1])
    X.sort()
    diff = [X[i] - X[i-1] for i in range(1, len(X))]
    D = functools.reduce(fractions.gcd, diff)
    print(D)
    # D = min(diff)
    # while any(np.array(diff)%D):
    #     D -= 1
    # print(D)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
import numpy as np
if __name__ == '__main__':
    NX = [int(n) for n in input().split()]
    X = [int(n) for n in input().split()]
    X.append(NX[1])
    # if len(X) == 1:
    #     print(abs(X[0]-NX[1]))
    #     sys.exit(0)

    X.sort()
    diff = [X[i] - X[i-1] for i in range(1, len(X))]
    D = min(diff)
    while any(np.array(diff)%D):
        D -= 1
    print(D)

Fixed submission:
import sys
import functools
import fractions

if __name__ == '__main__':
    NX = [int(n) for n in input().split()]
    X = [int(n) for n in input().split()]
    if len(X) == 1:
        print(abs(X[0]-NX[1]))
        sys.exit(0)

    X.append(NX[1])
    X.sort()
    diff = [X[i] - X[i-1] for i in range(1, len(X))]
    D = functools.reduce(fractions.gcd, diff)
    print(D)
    # D = min(diff)
    # while any(np.array(diff)%D):
    #     D -= 1
    # print(D)

Buggy python submission (verdict: Runtime Error):
import sys
import numpy as np
if __name__ == '__main__':
    NX = [int(n) for n in input().split()]
    X = [int(n) for n in input().split()]
    if len(X) == 1:
        print(abs(X-NX[1]))
        sys.exit(0)

    X.sort()
    diff = [X[i] - X[i-1] for i in range(1, len(X))]
    D = min(diff)
    while any(np.array(diff)%D):
        D -= 1
    print(D)

Fixed submission:
import sys
import functools
import fractions

if __name__ == '__main__':
    NX = [int(n) for n in input().split()]
    X = [int(n) for n in input().split()]
    if len(X) == 1:
        print(abs(X[0]-NX[1]))
        sys.exit(0)

    X.append(NX[1])
    X.sort()
    diff = [X[i] - X[i-1] for i in range(1, len(X))]
    D = functools.reduce(fractions.gcd, diff)
    print(D)
    # D = min(diff)
    # while any(np.array(diff)%D):
    #     D -= 1
    # print(D)
Buggy python submission (verdict: Runtime Error):
# cook your dish here
import numpy as np
if __name__ == '__main__':
    xy = [int(i) for i in input().split()]
    a1 = np.array([xy[0], xy[1]])
    a2 = np.array([xy[2], xy[3]])
    b = a2 - a1
    r = np.pi / 2
    rot = np.matrix((
        (np.cos(r), np.sin(r)),
        (-np.sin(r), np.cos(r))
    ))
    c = np.dot(b, rot)
    a3 = a2+c
    a4 = a1+c
    print('{} {} {} {}'.format(np.round(a3[0,0]), np.round(a3[0,1]), np.round(a4[0,0]), np.round(a4[0,1])))


Fixed submission:
if __name__ == '__main__':
    K = int(input())
    odds = int((K+1)/2)
    even = int(K/2)
    print(odds*even)

Buggy python submission (verdict: Runtime Error):
if __name__ == '__main__':
    K = input()
    odds = int(K+1)/2
    even = K/2
    print(odds*even)

Fixed submission:
if __name__ == '__main__':
    K = int(input())
    odds = int((K+1)/2)
    even = int(K/2)
    print(odds*even)
Buggy python submission (verdict: Runtime Error):
import numpy as np
if __name__ == '__main__':
    xy = [int(i) for i in input().split()]
    a1 = np.array([xy[0], xy[1]])
    a2 = np.array([xy[2], xy[3]])
    b = a2 - a1
    r = np.pi / 2
    rot = np.matrix((
        (np.cos(r), np.sin(r)),
        (-np.sin(r), np.cos(r))
    ))
    c = np.dot(b, rot)
    print('{} {} {} {}'.format(np.round(a3[0,0]), np.round(a3[0,1]), np.round(a4[0,0]), np.round(a4[0,1])))


Fixed submission:
# cook your dish here
import numpy as np
if __name__ == '__main__':
    xy = [int(i) for i in input().split()]
    a1 = np.array([xy[0], xy[1]])
    a2 = np.array([xy[2], xy[3]])
    b = a2 - a1
    r = np.pi / 2
    rot = np.matrix((
        (np.cos(r), np.sin(r)),
        (-np.sin(r), np.cos(r))
    ))
    c = np.dot(b, rot)
    a3 = a2+c
    a4 = a1+c
    print('{} {} {} {}'.format(int(np.round(a3[0,0])), int(np.round(a3[0,1])), int(np.round(a4[0,0])), int(np.round(a4[0,1]))))
Buggy python submission (verdict: Runtime Error):
if __name__ == '__main__':
    #AB = [int(i) for i in input().split()]
    N = int(input())
    n = 0
    for i in range(N):
        k = 0
        for j in range(int(i/2)):
            if i % j == 0:
                k += 1
            if k > 8:
                break
        if k == 8:
            n += 1
    print(n)

Fixed submission:
if __name__ == '__main__':
    #AB = [int(i) for i in input().split()]
    N = int(input())
    n = 0
    for i in range(3,N+1,2):
        k = 1
        for j in range(2,i+1):
            if i % j == 0:
                k += 1
            if k > 8:
                break
        if k == 8:
            n += 1
    print(n)