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

Fixed submission:
#!/usr/bin/env python3
# N = int(input())
# S = input()
A, B = map(int, input().split())
# A = list(map(int, input().split()))
if (A + B) % 2 == 0:
    print((A + B) // 2)
else:
    print("IMPOSSIBLE")

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
# N = int(input())
# S = input()
A, B = map(int, input().split())
# A = list(map(int, input().split()))
if (A + B) % 2 == 0:
    print((A + B)) // 2)
else:
    print("IMPOSSIBLE")
Problem p02993 (python)

Fixed submission:
#!/usr/bin/env python3
# N = int(input())
S = input()
# N, A, B = map(int, input().split())
# A = list(map(int, input().split()))

for i in range(len(S) - 1):
    if S[i] == S[i + 1]:
        print("Bad")
        break
else:
    print("Good")

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
# N = int(input())
S = input()
# N, A, B = map(int, input().split())
# A = list(map(int, input().split()))

for i in range(len(S) - 1):
    if S[i] == S[i + 1]:
        print("Bad")
        break
else:
    pirnt("Good")
Problem p03164 (python)

Fixed submission:
N, W = map(int, input().split())
items = [[0, 0]]
v_total = 0
for _ in range(N):
    w, v = map(int, input().split())
    items.append([w, v])
    v_total += v

dp = [[float("inf")] * (v_total + 1) for _ in range(N + 1)]

for i in range(N + 1):
    dp[i][0] = 0

ans = 0
for i in range(1, N + 1):
    for j in range(v_total + 1):
        if j - items[i][1] >= 0:
            dp[i][j] = min(dp[i - 1][j - items[i][1]] + items[i][0], dp[i - 1][j])
        else:
            dp[i][j] = dp[i - 1][j]

        if i == N and dp[i][j] <= W:
            ans = max(ans, j)

print(ans)

Buggy submission (verdict: Runtime Error):
N, W = map(int, input().split())
items = [[0, 0]]
for _ in range(N):
    items.append(list(map(int, input().split())))

dp = [[float("inf") for _ in range(10 ** 3 + 1)] for _ in range(N + 1)]

for i in range(N + 1):
    dp[i][0] = 0

for i in range(1, N + 1):
    for j in range(10 ** 5 + 1):
        if j - items[i][1] >= 0:
            dp[i][j] = min(dp[i - 1][j - items[i][1]] + items[i][0], dp[i - 1][j])
        else:
            dp[i][j] = dp[i - 1][j]

ans = 0
for i in range(N + 1):
    for j in range(10 ** 5 + 1):
        if dp[i][j] <= W:
            ans = max(ans, j)
print(ans)

Buggy submission (verdict: Runtime Error):
N, W = map(int, input().split())
items = [[0, 0]]
for _ in range(N):
    items.append(list(map(int, input().split())))

dp = [[float("inf") for _ in range(10 ** 3 + 1)] for _ in range(N + 1)]

for i in range(N + 1):
    dp[i][0] = 0

for i in range(1, N + 1):
    for j in range(10 ** 5 + 1):
        if j - items[i][1] >= 0:
            dp[i][j] = min(dp[i - 1][j - items[i][1]] + items[i][0], dp[i - 1][j])
        else:
            dp[i][j] = dp[i - 1][j]

ans = 0
for i in range(N + 1):
    for j in range(10 ** 5 + 1):
        if dp[i][j] <= W:
            ans = max(ans, j)
print(ans)
Problem p03262 (python)

Fixed submission:
import numpy as np
import fractions
import functools
N, X = map(int, input().split())
x = np.array(sorted(list(map(int, input().split()))))
x =  np.insert(x, np.where(x > X)[0][0], X) if len(np.where(x > X)[0]) > 0 else np.append(x, X)
x = np.diff(x)
print(functools.reduce(fractions.gcd, x))

Buggy submission (verdict: Runtime Error):
import numpy as np
import fractions
import functools
N, X = map(int, input().split())
x = np.array(sorted(list(map(int, input().split()))))
x =  np.insert(x, np.where(x > X)[0], X) if len(np.where(x > X)) > 0 else np.insert(x, -1, X)
x = np.diff(x)
print(functools.reduce(fractions.gcd, x))

Buggy submission (verdict: Runtime Error):
import numpy as np
import fractions
import functools
N, X = map(int, input().split())
x = np.array(sorted(list(map(int, input().split()))))
x = np.insert(x, np.where(x > X)[0], X)
x = np.diff(x)
print(functools.reduce(fractions.gcd, x))
Problem p03266 (python)

Fixed submission:
N, K = map(int, input().split())
num = [0 for _ in range(K)]
for i in range(1, N + 1):
    num[i % K] += 1
ans = 0
for a in range(K):
    b = (K - a) % K
    c = (K - a) % K
    if (b + c) % K == 0:
        ans += num[a] * num[b] * num[c]
print(ans)

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
num = [0 for _ in range(N)]
for i in range(1, N + 1):
    num[i % K] += 1
ans = 0
for a in range(N):
    b = (K - a) % K
    c = (K - a) % K
    if (b + c) % K == 0:
        ans += num[a] * num[b] * num[c]
print(ans)
Problem p03354 (python)

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

class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x
    
    def same(self, x, y):
        return self.find(x) == self.find(y)

unionfind = UnionFind(N + 1)

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

ans = 0
idx = []
for i in range(N):
    if P[i] == (i + 1):
        ans += 1
    else:
        idx.append(i)
for i in idx:
    if unionfind.same(P[i], i + 1):
        ans += 1
print(ans)

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

class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

unionfind = UnionFind(N)
for _ in range(M):
    x, y = map(int, input().split())
    unionfind.union(x, y)
ans = 0
for i in range(N):
    if i + 1 != p[i]:
        if unionfind.same(p[i], i + 1):
            ans += 1
    else:
        ans += 1
print(ans)
Problem p03486 (python)

Fixed submission:
from collections import Counter
s = input()
t = input()
s_cnt = sorted(Counter(s).most_common())
t_cnt = sorted(Counter(t).most_common())[::-1]
s_replaced = ""
t_replaced = ""
for k, v in s_cnt:
    s_replaced += k * v 
for k, v in t_cnt:
    t_replaced += k * v 

def judge(s, t):
    for i in range(min(len(s), len(t))):
        if ord(s[i]) > ord(t[i]):
            return False
        if ord(s[i]) < ord(t[i]):
            return True
    if len(s) < len(t):
        return True
    else:
        return False

if judge(s_replaced, t_replaced):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
from collections import Counter
s = input()
t = input()
s_cnt = sorted(Counter(s).most_common())
t_cnt = sorted(Counter(t).most_common())[::-1]
s_replaced = ""
t_replaced = ""
for k, v in s_cnt:
    s_replaced += k * v 
for k, v in t_cnt:
    t_replaced += k * v 

def judge(s, t):
    for i in range(len(s)):
        if ord(s[i]) > ord(t[i]):
            return False
        if ord(s[i]) < ord(t[i]):
            return True
    if len(s) < len(t):
        return True
    else:
        return False

if judge(s_replaced, t_replaced):
    print("Yes")
else:
    print("No")
Problem p03546 (python)

Fixed submission:
#!/usr/bin/env python3
import copy

H, W = map(int, input().split())
c = [list(map(int, input().split())) for _ in range(10)]
grid = [list(map(int, input().split())) for _ in range(H)]

d = dict()
nums = [i for i in range(10) if i != 1]
d["-1_1"] = 0

q = [[[1], 0]]

while q:
    tmp = q.pop()
    num, cost = tmp[0], tmp[1]
    key = str(num[-1]) + "_1"
    if d.get(key):
        d[key] = min(d[key], cost)
    else:
        d[key] = cost
    if len(num) < 10:
        for n in nums:
            num_tmp = copy.copy(num)
            if n not in set(num_tmp):
                num_tmp.append(n)
                q.append([num_tmp, cost + c[num_tmp[-1]][num_tmp[-2]]])

ans = 0
for i in range(H):
    for j in range(W):
        tmp = grid[i - 1][j - 1] 
        ans += d[str(tmp) + "_1"]
print(ans)

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3

H, W = map(int, input().split())
c = [list(map(int, input().split())) for _ in range(10)]
grid = [list(map(int, input().split())) for _ in range(H)]

d = dict()
nums = [i for i in range(10) if i != 1]

q = [[[1], 0]]

while q:
    tmp = q.pop()
    num, cost = tmp[0], tmp[1]
    key = str(num[-1]) + "_1"
    if d.get(key):
        d[key] = min(d[key], cost)
    else:
        d[key] = cost
    if len(num) < 10:
        for n in nums:
            num_tmp = num.copy()
            if n not in set(num_tmp):
                num_tmp.append(n)
                q.append([num_tmp, cost + c[num_tmp[-1]][num_tmp[-2]]])

ans = 0
for i in range(H):
    for j in range(W):
        tmp = grid[i - 1][j - 1] 
        if tmp >= 0:
            ans += d[str(tmp) + "_1"]
print(ans)

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
from collections import defaultdict, deque

H, W = map(int, input().split())
c = [list(map(int, input().split())) for _ in range(10)]
grid = [list(map(int, input().split())) for _ in range(H)]

d = defaultdict(lambda: float("inf"))
d["1_1"] = 0
nums = [i for i in range(10) if i != 1]

q = deque([[[1], 0]])

while q:
    tmp = q.pop()
    num, cost = tmp[0], tmp[1]
    if len(num) > 1:
        key = str(num[-1]) + "_1"
        d[key] = min(d[key], cost)
    if len(num) < 10:
        for n in nums:
            num_tmp = num.copy()
            if n not in set(num_tmp):
                num_tmp.append(n)
                q.append([num_tmp, cost + c[n][num_tmp[-2]]])

ans = 0
for i in range(H):
    for j in range(W):
        tmp = grid[i - 1][j - 1] 
        if tmp >= 0:
            ans += d[str(tmp) + "_1"]
print(ans)
Problem p03569 (python)

Fixed submission:
import sys

S = sys.stdin.readline().rstrip()
not_x = []

for i, s in enumerate(S):
    if s != "x":
        not_x.append(s)

not_x_nums = len(not_x)
mid = not_x_nums // 2

if not_x_nums % 2 == 1:
    left = not_x[:mid]
    right = not_x[mid + 1:][::-1]
else:
    left = not_x[:mid]
    right = not_x[mid:][::-1]

if left == right:
    ans = 0
    left = []
    right = []
    tmp = 0
    cnt = 0
    if not_x_nums % 2 == 1:
        mid += 1
    for s in S:
        if s != "x":
            left.append(tmp)
            tmp = 0
            cnt += 1
        else:
            tmp += 1
        if cnt == mid:
            break
    tmp = 0
    cnt = 0
    for s in S[::-1]:
        if s != "x":
            right.append(tmp)
            tmp = 0
            cnt += 1
        else:
            tmp += 1
        if cnt == mid:
            break
    for l, r in zip(left, right):
        ans += abs(l - r)
    print(ans)
else:
    print(-1)

Buggy submission (verdict: Runtime Error):
import sys

S = sys.stdin.readline().rstrip()
N = len(S)
not_x = []
x_cnt_idx = [0] * N
not_x_cnt_idx = [0] * N

for i, s in enumerate(S):
    if s != "x":
        not_x.append(s)
        not_x_cnt_idx[i] = not_x_cnt_idx[i - 1] + 1 if i > 0 else 1
    else:
        x_cnt_idx[i] = x_cnt_idx[i - 1] + 1 if i > 0 else 1

not_x_cnt = len(not_x)
x_cnt = N - not_x_cnt

if not_x_cnt == 0:
    ans = 0
    print(ans)
    exit()
elif not_x_cnt == 1:
    if N == 1:
        ans = 0
    else:
        x_left_cnt = x_cnt_idx[not_x_cnt_idx.index(1)]
        ans = abs(x_left_cnt - (x_cnt - x_left_cnt))
    print(ans)
    exit()

if not_x_cnt % 2 == 1:
    left = not_x[:not_x_cnt // 2]
    right = not_x[not_x_cnt // 2 + 1:][::-1]
else:
    left = not_x[:not_x_cnt // 2]
    right = not_x[not_x_cnt // 2:][::-1]

if left == right:
    if x_cnt == 0:
        ans = 0
    else:
        x_left_cnt = x_cnt_idx[not_x_cnt_idx.index(not_x_cnt // 2)]
        ans = abs(x_left_cnt - (x_cnt - x_left_cnt))
    print(ans)
else:
    print(-1)
Problem p03612 (python)

Fixed submission:
#!/usr/bin/env python3

N = int(input())
# S = input()
# N, K = map(int, input().split())
P = list(map(int, input().split()))

def main():
    ans = 0
    for i, p in enumerate(P, 1):
        if i == p:
            ans += 1
            if i != N:
                P[i] = p
    print(ans)

if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3

N = int(input())
# S = input()
# N, K = map(int, input().split())
P = list(map(int, input().split()))

def main():
    pre = 0
    ans = 0
    for i, p in enumerate(P, 1):
        if i == p:
            ans += 1
            P[i] = p
    print(ans)
    
if __name__ == "__main__":
    main()
Problem p03633 (python)

Fixed submission:
#!/usr/bin/env python3

N = int(input())
# S = input()
# N, K = map(int, input().split())
# A = list(map(int, input().split()))
mod = 10 ** 9
from functools import reduce
from fractions import gcd

def main():
    T = sorted(list(set([int(input()) for _ in range(N)])))
    if len(T) == 1:
        print(T[0])
        exit()
    ans = (T[0] * T[1]) // gcd(T[0], T[1])
    for i in range(len(T) - 2):
        ans = (ans * T[i + 2]) // (gcd(ans, T[i + 2]))
    print(ans)

if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3

N = int(input())
# S = input()
# N, K = map(int, input().split())
# A = list(map(int, input().split()))
mod = 10 ** 9
from functools import reduce
from fractions import gcd

def main():
    T = sorted(list(set([int(input()) for _ in range(N)])))
    if len(T) == 1:
        print(T[0])
        exit()
    ans = (T[0] * T[1]) // gcd(T[0], T[1])
    for i in range(len(T) - 2):
        ans = int(ans / gcd(ans, T[i + 2]) * T[i + 2])
    print(ans)

if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3

N = int(input())
# S = input()
# N, K = map(int, input().split())
# A = list(map(int, input().split()))
mod = 10 ** 9
from functools import reduce
from fractions import gcd

def main():
    T = sorted(list(set([int(input()) for _ in range(N)])))
    if len(T) == 1:
        print(T[0])
        exit()
    ans = (T[0] * T[1]) // gcd(T[0], T[1])
    for i in range(len(T) - 2):
        ans = round(ans / gcd(ans, T[i + 2]) * T[i + 2])
    print(ans)

if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3

N = int(input())
# S = input()
# N, K = map(int, input().split())
# A = list(map(int, input().split()))
mod = 10 ** 9
from functools import reduce
from fractions import gcd

def main():
    T = list(set([int(input()) for _ in range(N)]))
    if len(T) == 1:
        print(T[0])
        exit()
    ans = (T[0] * T[1]) // gcd(T[0], T[1])
    for i in range(len(T) - 2):
        ans = round(ans / (gcd(ans, T[i])) * T[i])
    print(ans)

if __name__ == "__main__":
    main()
Problem p03638 (python)

Fixed submission:
H, W = map(int, input().split())
N = int(input())
A = list(map(int, input().split()))
A.insert(0, 0)

ans = [[-1 for _ in range(W)] for _ in range(H)]
color = 1

for i in range(H):
    for j in range(W):
        if A[color] == 0:
            color += 1
        A[color] -= 1
        ans[i][j] = color

for i in range(H):
    a = ans[i]
    if i % 2 == 1:
        a = a[::-1]
    print(" ".join(map(str, a)))

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3

from collections import deque
H, W = map(int, input().split())
N = int(input())
A = list(map(int, input().split()))
A.insert(0, 0)

done = [[True for _ in range(W)] for _ in range(H)]
ans = [[-1 for _ in range(W)] for _ in range(H)]

q = deque([(0, 0, 1)])
color = 1

while q:
    x, y, color = q.pop()
    if A[color] > 0:
        ans[x][y] = color
        A[color] -= 1
    else:
        color += 1
        ans[x][y] = color
        A[color] -= 1

    for i, j in [(1, 0), (-1, 0), (0, 1), (0, -1)]:
        x_next = x + i
        y_next = y + j
        if (0 <= x_next and x_next < H 
        and 0 <= y_next and y_next < W
        and done[x_next][y_next] is True):
            q.append((x_next, y_next, color))

[print(" ".join(map(str, a))) for a in ans]
Problem p03829 (python)

Fixed submission:
#!/usr/bin/env python3
import numpy as np
N, A, B = map(int, input().split())
X = np.array(list(map(int, input().split())))
diff = np.diff(X)
ans = 0
for d in diff:
    if d * A <= B:
        ans += d * A
    else:
        ans += B
print(ans)

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
import numpy as np
N, A, B = map(int, input().split())
X = np.array(list(map(int, input().split())))
diff = np.diff(X)
ans = 0
for d in diff:
    if d * A <= B:
        ans += d * A
    else:
        ans += B
print(ans)
Problem p02657 (python)

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

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

Fixed submission:
import math
n =int(input())
print(2*n*math.pi)

Buggy submission (verdict: Runtime Error):
import math
n =int(input())
print(2*n*math.pi())

Buggy submission (verdict: Runtime Error):
import math
n =int(input())
proint(2*n*math.pi)

Buggy submission (verdict: Runtime Error):
import math
n =int(input())
proint(2*n*math.pi())
Problem p02706 (python)

Fixed submission:
a,b=map(int,input().split())
 
c=[int(i) for i in input().split()]
d=sum(c)
print(a-sum(c) if a>=sum(c) else '-1')

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

c=[i for i in input().split()]

print(a-sum(c) if a>=sum(c) else '-1')
Problem p02717 (python)

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


print(a,b,c)

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
a=n
b=(n//k)
c=n-k*b
d=c-k

  
if abs(c)>abs(d):
    print(str(abs(d)))
else:
    print(str(abs(c)))
Problem p02621 (python)

Fixed submission:
def main(a):
    return a + a**2 + a**3

if __name__ == "__main__":
    a = int(input())
    print(int(main(a)))

Buggy submission (verdict: Runtime Error):
def main(a):
    return a + a**2 + a**3

if __name__ == "__main__":
    a = input()
    print(main(a))
Problem p03037 (python)

Fixed submission:
import sys

N, M = map(lambda x: int(x), sys.stdin.readline().split(" "))

_min, _max = 1, 100000
for _ in range(0, M):
    L, R = map(lambda x: int(x), sys.stdin.readline().split(" "))
    _min = max(_min, L)
    _max = min(_max, R)
if _min > _max:
    print(0)
else:
    print(_max - _min + 1)

Buggy submission (verdict: Runtime Error):
import sys
import math
 
N, M = map(lambda x: int(x), sys.stdin.readline().split(" "))
 
_min, _max = -math.inf, math.inf
for i in range(0, M):
    L, R = map(lambda x: int(x), sys.stdin.readline().split(" "))
    _min = max(_min, L)
    _max = min(_max, R)
print(_max - _min + 1)

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

N, M = map(lambda x: int(x), sys.stdin.readline().split(" "))

_min, _max = -math.inf, math.inf
for i in range(0, M):
    L, R = map(lambda x: int(x), sys.stdin.readline().split(" "))
    _min = max(_min, L)
    _max = min(_max, R)
print(_max - _min + 1)
Problem p02612 (python)

Fixed submission:
#! /usr/bin/python3

N = int(input())
1 <= N <= 10000

if N % 1000 == 0:
 print(0)
else:
  sen = N//1000
  sen2 = sen*1000
  atai = N-sen2
  atai2 = 1000-atai
  print(atai2)

Buggy submission (verdict: Runtime Error):

N = input()
if N % 1000 == 0:
   print(0)
else:
  #N=5300として考えてみる
  ##5300払ったとして5
  sen = N//1000
  ##5*1000=5000円
  sen2 = sen*1000
  ##N(5300)-sen2(5000)
  atai = N-sen2
  #お釣りが300円と出るはずでは？
  print(atai)

Buggy submission (verdict: Runtime Error):
#! /usr/bin/python3

N = [int(input()) for N in range(10000)]
#N = 5300
if N % 1000 == 0:
   print(0)
else:
  #N=5300として考えてみる
  ##5300払ったとして5
  sen = N//1000
  ##5*1000=5000円
  sen2 = sen*1000
  ##N(5300)-sen2(5000)
  atai = N-sen2
  #お釣りが300円と出るはずでは？
  print(atai)

Buggy submission (verdict: Runtime Error):
#! /usr/bin/python3

N = [int(input()) for N in range(10000)]

if N % 1000 == 0:
   print(0)
else:
  #N=5300として考えてみる
  ##5300払ったとして5
  sen = N/1000
  print(sen)
  ##5*1000=5000円
  sen2 = sen*1000
  ##N(5300)-sen2(5000)
  atai = N-sen2
  #お釣りが300円と出るはずでは？
  print(atai)

Buggy submission (verdict: Runtime Error):
N=int(input())
##一万円まで
for N in 10000:
  ##1000円で割り切れたらお釣りなし
  if N % 1000 == 0:
   print(0)
else:
  #N=5300として考えてみる
  ##5300払ったとして5
  sen = N/1000
  ##5*1000=5000円
  sen2 = sen*1000
  ##N(5300)-sen2(5000)
  atai = N-sen2
  #お釣りが300円と出るはずでは？
  print(atai)

Buggy submission (verdict: Runtime Error):
N=int(input())
 sen = N//1000:
 sen2 = sen*1000
 atai = N-sen2
 
for N in 10000:
  if N % 1000 == 0：
  print(0)
else:
  print(atai)

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

##一万円まで
for N in 10000:
  if N % 1000 == 0：
  print(0)

Buggy submission (verdict: Runtime Error):
N=int(input())
 
for N in 10000:
  if N % 1000 == 0：
  print(0)
else:
  sen = N//1000:
  sen2 = sen*1000
  atai = N-sen2
  print(atai)

Buggy submission (verdict: Runtime Error):
N=int(input())
 
for N in 10000:
  if N % 1000 == 0：
  print(0)
else:
  sen = N/1000:
  sen2 = sen*1000
  atai = N-sen2
  print(atai)

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

for N in 10000:
  if 1000 % N == 0：
  print(0)
else:
  sen = 1000/N:
  atai = N-sen
  print(sen + atai )

Buggy submission (verdict: Runtime Error):
N=int(input())
sen = N / 1000:

if N % 1000 == 0：
  print(0)
else:
  atai = N - sen
  print(sen + atai )

Buggy submission (verdict: Runtime Error):
N=int(input())
sen = N % 1000:

for N in 10000:
  if N % 1000 == 0：
  print(0)
else:
  atai = N - sen
  print(sen + atai )

Buggy submission (verdict: Runtime Error):
N=int(input())
sen = N / 1000:
print(sen)
 
for N in 10000:
  if N % 1000 == 0：
  print(0)
else:
  atai = N - sen
  print(sen + atai )

Buggy submission (verdict: Runtime Error):
N=int(input())
sen = N / 1000:
 
for N in 10000:
  if N % 1000 == 0：
  print(0)
else:
  atai = N - sen
  print(sen + atai )

Buggy submission (verdict: Runtime Error):
N = int input()
sen = N / 1000:
 
for N in 10000:
  if N % 1000 == 0：
  print(0)
else:
  atai = N - sen
  print(sen + atai )

Buggy submission (verdict: Runtime Error):
N = int input()
sen = N / 1000:

for 1000 in 10000:
  if N % 1000 == 0：
  print(0)
else:
  print(sen + 1000-N)
Problem p03434 (python)

Fixed submission:
N = int(input())
a = list(map(int, input().split()))
 
a.sort(reverse=True)
 
print(sum(a[::2])-sum(a[1::2]))

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

a.sort(reverse=True)

print(sum(a[::2])-sum(a[1::2]))
Problem p03448 (python)

Fixed submission:
a,b,c,d = map(int, open(0))
print(sum(500*x+100*y+50*z==d for x in range(a+1) for y in range(b+1) for z in range(c+1)))

Buggy submission (verdict: Runtime Error):
a,b,c,d = map(int, input().open(0).split())
print(sum(500*x+100*y+50*z==d for x in range(a+1) for y in range(b+1) for z in range(c+1)))

Buggy submission (verdict: Runtime Error):
a,b,c,d = map(int, input().open().read().split())
print(sum(500*x+100*y+50*z==d for x in range(a+1) for y in range(b+1) for z in range(c+1)))