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

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

## min(Ax + By + Cz) = min((A+0.5C)x + (B+0.5C)y)
# Xyen = Ai + 2Cj, Yyen = Bk + 2Cj, X = i +2j, Y = k + 2j
# Xyen + Yyen = AX + BY + 2(C-A)j + 2(C-B)j, jを求めればok?

# l = []
# for j in range(max(X,Y)+1):
#     if j <= X+Y:
#         l.append(A*X + B*Y + (C-A*0.5-B*0.5)*j)

# print(int(min(l)))

X1 = X
Y1 = Y
price = []
for i in range(0, max(X,Y)+1):
    price.append(max(0,(X1-i))*A+max(0,(Y1-i))*B+2*i*C) 
print(min(price))

Buggy submission (verdict: Runtime Error):
import sys
A, B, C, X, Y = map(int,input().split())
 
minf = sys.maxsize
X1 = X
Y1 = Y
 
for i in range(0, max(X,Y)+1):
    price = max(0,(X1-i))*A+max(0,(Y1-i))*B+2*i*C 
print(min(price))

Buggy submission (verdict: Runtime Error):
import sys
A, B, C, X, Y = map(int,input().split())
 
minf = sys.maxsize
X1 = X
Y1 = Y
 
 
for i in range(0, max(X,Y)+1):
    price = max(0,(X1-i))*A+max(0,(Y1-i))*B+2*i*C
 
 
print(min(price))
Problem p03435 (python)

Fixed submission:
import numpy as np
C = []
for i in range(3):
    c_horizontal = list(map(int, input().split()))
    C.append(c_horizontal)

## Ax = C
A = np.array([
    [1, 0, 0, 1, 0, 0],
    [1, 0, 0, 0, 1, 0],
    [1, 0, 0, 0, 0, 1],
    [0, 1, 0, 1, 0, 0],
    [0, 1, 0, 0, 1, 0],
    [0, 1, 0, 0, 0, 1],
    [0, 0, 1, 1, 0, 0],
    [0, 0, 1, 0, 1, 0],
    [0, 0, 1, 0, 0, 1] ])
# 拡大係数行列
Ab = np.array([
    [1, 0, 0, 1, 0, 0, C[0][0]],
    [1, 0, 0, 0, 1, 0, C[0][1]],
    [1, 0, 0, 0, 0, 1, C[0][2]],
    [0, 1, 0, 1, 0, 0, C[1][0]],
    [0, 1, 0, 0, 1, 0, C[1][1]],
    [0, 1, 0, 0, 0, 1, C[1][2]],
    [0, 0, 1, 1, 0, 0, C[2][0]],
    [0, 0, 1, 0, 1, 0, C[2][1]],
    [0, 0, 1, 0, 0, 1, C[2][2]] ])

# 係数行列と拡大係数行列のランクをそれぞれ求める
rankA = np.linalg.matrix_rank(A)
rankAb = np.linalg.matrix_rank(Ab)

if rankA == rankAb:
    print('Yes')
else:
    print('No')

# print(C)
# A = [0] * 3
# B = [0] * 3
# flgList = []
# for k in range(3):
#     flgHorizontal = [False] * 3
#     flgList.append(flgHorizontal)
# ## c(i, j) = a(i) + b(j)
# for i in range(3):
#     for a in range(101):
#         A[i] = a
#         for j in range(3):
#             B[j] = C[i][j] - A[i]
#                 if C[i][j] == A[i] + B[j]:
#                     print(C[i][j], A[i], B[j])
#                     flgList[i][j] = True
# print(flgList)
# determinantList = [False] * 3
# for m in range(3):
#     if all(flgList[m]):
#         determinantList[m] = True

# if all(determinantList):
#     print('Yes')
# else:
#     print('No')C

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

# F(A, B)を定義する
def F(A, B):
    A = str(A)
    B = str(B)
    if len(A) >= len(B):
        return len(A)
    else:
        return len(B)

minimumList = []
for a in range(1, int(N**0.5) + 1):
    if N % a == 0:
        b = N // a
        minimumList.append(F(a, b))
print(min(minimumList))

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

# F(A, B)を定義する
def F(A, B):
    A = str(A)
    B = str(B)
    if len(A) >= len(B):
        return len(A)
    else:
        return len(B)

minimumList = []
for a in range(1, int(N**0.5) + 1):
    if N % a == 0:
        b = N // a  # 商
        minimumList.append(F(a, b))
print(min(minimumList))
Problem p03495 (python)

Fixed submission:
n,k=map(int,input().split())
a=list(map(int,input().split()))
d={}
l=[]
for i in range(n):
    try:
        l[d[a[i]]]+=1
    except:
        d[a[i]]=len(l)
        l.append(1)
ans=0
l.sort()
for i in range(len(l)-k):
    ans+=l[i]
print(ans)

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

N, K = map(int, input().split())
A = [int(input()) for _ in range(N)]
## 種類数の求め方
# 1. A内の要素を取り出して、それがA内に存在するとき：種類＋１
# 2. その要素を重複数だけAから削除してループ

kinds = 0
A = sorted(A)
duplicatedList = []
while len(A) > 0:
    if A[0] in A:
        kinds += 1
        duplicatedList.append(A.count(A[0]))
        for j in range(A.count(A[0])):
            A.remove(A[0])

if kinds <= K:
    print('0')
elif kinds > K:
    duplicatedList = sorted(duplicatedList)
    tmp = 0
    for i in range(kinds-K):
        tmp += duplicatedList[i]
    print(tmp)

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

N, K = map(int, input().split())
A = [int(input() for _ in range(N))]
## 種類数の求め方
# 1. A内の要素を取り出して、それがA内に存在するとき：種類＋１
# 2. その要素を重複数だけAから削除してループ

kinds = 0
A = sorted(A)
duplicatedList = []
while len(A) > 0:
    if A[0] in A:
        kinds += 1
        duplicatedList.append(A.count(A[0]))
        for j in range(A.count(A[0])):
            A.remove(A[0])

if kinds <= K:
    print('0')
elif kinds > K:
    duplicatedList = sorted(duplicatedList)
    tmp = 0
    for i in range(kinds-K):
        tmp += duplicatedList[i]
    print(tmp)
Problem p03944 (python)

Fixed submission:
W, H, N = map(int, input().split())
X = []
Y = []
A = []
for i in range(N):
    x, y, a = map(int, input().split())
    X.append(x)
    Y.append(y)
    A.append(a)

## 長方形のマスを塗りつぶしていって残ったマス目を数えるイメージ
# 0: 白, 1: 黒
square = []
for i in range(H):
    horizonatlArea = []
    for j in range(W):
        horizonatlArea.append(0)
    square.append(horizonatlArea)

# Aの要素の番号に応じてsquareに1を埋めていく
for n in range(N):
    if A[n] == 1:
        for i in range(X[n]):
            for j in range(H):
                square[j][i] = 1
    elif A[n] == 2:
        for i in range(X[n], W):
            for j in range(H):
                square[j][i] = 1
    elif A[n] == 3:
        for i in range(W):
            for j in range(Y[n]):
                square[j][i] = 1
    elif A[n] == 4:
        for i in range(W):
            for j in range(Y[n], H):
                square[j][i] = 1

# square内の要素の数を数えて出力
cnt = 0
for j in range(H):
    cnt += square[j].count(0)

print(cnt)

Buggy submission (verdict: Runtime Error):
W, H, N = map(int, input().split())
X = []
Y = []
A = []
for i in range(N):
    x, y, a = map(int, input().split())
    X.append(x)
    Y.append(y)
    A.append(a)

## 長方形のマスを塗りつぶしていって残ったマス目を数えるイメージ
# 0: 白, 1: 黒
square = []
for i in range(H):
    horizonatlArea = []
    for j in range(W):
        horizonatlArea.append(0)
    square.append(horizonatlArea)

# Aの要素の番号に応じてsquareに1を埋めていく
for n in range(N):
    if A[n] == 1:
        for i in range(X[n]):
            for j in range(H):
                square[j][i] = 1
    elif A[n] == 2:
        for i in range(X[n], W):
            for j in range(H):
                square[j][i] = 1
    elif A[n] == 3:
        for i in range(W):
            for j in range(y[n]):
                square[j][i] = 1
    elif A[n] == 4:
        for i in range(W):
            for j in range(Y[n], H):
                square[j][i] = 1

# square内の要素の数を数えて出力
cnt = 0
for j in range(H):
    cnt += square[j].count(0)

print(cnt)

Buggy submission (verdict: Runtime Error):
W, H, N = map(int, input().split())
X = []
Y = []
A = []
for i in range(N):
    x, y, a = map(int, input().split())
    X.append(x)
    Y.append(y)
    A.append(a)

## 長方形のマスを塗りつぶしていって残ったマス目を数えるイメージ
# 0: 白, 1: 黒
square = []
for i in range(H):
    horizonatlArea = []
    for j in range(W):
        horizonatlArea.append(0)
    square.append(horizonatlArea)

# Aの要素の番号に応じてsquareに1を埋めていく
for n in range(N):
    if A[n] == 1:
        for i in range(X[n]):
            for j in range(H):
                square[j][i] = 1
    elif A[n] == 2:
        for i in range(X[n], W):
            for j in range(H):
                square[j][i] = 1
    elif A[n] == 3:
        for i in range(W):
            for j in range(y[n]):
                square[j][i] = 1
    elif A[n] == 4:
        for i in range(W):
            for j in range(Y[n], H):
                square[j][i] = 1
print(square)

# square内の要素の数を数えて出力
cnt = 0
for j in range(H):
    cnt += square[j].count(0)

print(cnt)
Problem p02830 (python)

Fixed submission:
n = int(input())
s, t = input().split()

r = []
for i in range(n):
    r.append(s[i])
    r.append(t[i])

print(''.join(r))

Buggy submission (verdict: Runtime Error):
n = int(input())
s, t = input().split()

r = []
for i in range(len(s)):
  str.append(s[i])
  str.append(t[i])

print(''.join(r))
Problem p02945 (python)

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

Buggy submission (verdict: Runtime Error):
a, b = map(int, input())
print(max(a+b, a-b, a*b))
Problem p03160 (python)

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

dp = [float('inf')] * N
dp[0] = 0
dp[1] = abs(h[1] - h[0])

for i in range(2, N):
    dp[i] = min(abs(h[i] - h[i-1]) + dp[i-1], abs(h[i] - h[i-2]) + dp[i-2])

print(dp[-1])

Buggy submission (verdict: Runtime Error):
n = int(input())
h = list(map(int, input().split()))

def dp(n):
    if n == 0:
        return 0
    if n == 1:
        return abs(h[1] - h[0])
    return min(dp(n-1) + abs(h[n] - h[n-1]), dp(n-2) + abs(h[n] - h[n-2]))

print(dp(n-1))
Problem p02817 (python)

Fixed submission:
# -*- coding: utf-8 -*-
a, b = input().split()
print("{}{}".format(b,a))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
a, b = input().split()
pirnt("{}{}".format(b,a))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
a, b = input().split()
pirnt("{}{}".format(b,a))
Problem p02923 (python)

Fixed submission:
n = int(input())
h= list(map(int, input().split())) 

count = 0
ans = 0

for i in range(len(h)):
    if i + 1 < len(h):
        if h[i] >= h[i+1]:
            count = count + 1
        else:
            count = 0
    if count > ans :
        ans = count
        
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
h= list(map(int, input().split())) 

count = 0
ans = 0
def dfs(s):
    if s + 1 < len(h):
        if h[s] >= h[s+1]:
            global count 
            count = count + 1
            dfs(s+1)
    

for i in range(len(h)):
    count = 0
    dfs(i)
    if count > ans :
        ans = count
        
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
h= list(map(int, input().split())) 

count = 0
ans = 0
def dfs(s):
    if s + 1 < len(h):
        if h[s] >= h[s+1]:
            global count 
            count = count + 1
            return dfs(s+1)
    

for i in reversed(range(len(h))):
    count = 0
    aaa = dfs(i)
    if count > ans :
        ans = count
        
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
h= list(map(int, input().split())) 

count = 0
        
def dfs(s):
    if s + 1 < len(h):
        if h[s] >= h[s+1]:
            global count 
            count = count + 1
            return dfs(s+1)
    

for i in reversed(range(len(h))):
    count = 0
    aaa = dfs(i)
    if count == i:
        print(count)
        break
Problem p02817 (python)

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

Buggy submission (verdict: Runtime Error):
s,t = input.split()
print(t,s,sep='')
Problem p02817 (python)

Fixed submission:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
S,T = read().decode('utf-8').split()
 
answer = T + S
print(answer)

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

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

Buggy submission (verdict: Runtime Error):
S = input().split()
T = input().split()
print(S + T)

Buggy submission (verdict: Runtime Error):
S = input().split()
T = input().split()
txt = S + T
print(txt)

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

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

Buggy submission (verdict: Runtime Error):
S = input("文字列Sを入力")
T = input("文字列Tを入力")
txt = S + T
print(txt)

Buggy submission (verdict: Runtime Error):
moji_s=input("文字列Sを入力:")
moji_t=input("文字列Tを入力:")
print(moji_s + moji_t)
Problem p02817 (python)

Fixed submission:
print("".join(reversed(input("").split(" "))))

Buggy submission (verdict: Runtime Error):
print("".join(reverse(input("").split(" "))))
Problem p03545 (python)

Fixed submission:
a = [int(x) for x in list(input())]
op = 3
ops = [0] * op
for i in range(2 ** op):
    result = a[0]
    bry = list(format(i, "0{}b".format(op)))
    for index, value in enumerate(bry):
        if value == "1":
            result += a[index + 1]
            ops[index] = "+"
        else:
            result -= a[index + 1]
            ops[index] = "-"
    if result == 7:
        ans = str(a[0])
        for j in range(3):
            ans += "{}{}".format(ops[j], a[j+1])
        ans += "=7"
        print(ans)
        break

Buggy submission (verdict: Runtime Error):
a, b, c, d = input()
o = "+-"
for i in range(2 ** 3):
    s = a + o[i & 1] + b + o[i & 2] + c + o[i & 4] + d
    if eval(s) == 7:
        print(s + "=7")
        break
Problem p04001 (python)

Fixed submission:

num = input()
num_array = [i for i in num]

splits = len(num) - 1
n = 2 ** splits

sum = 0

if splits > 0:
    for i in range(n):
        bin = format(i, "0{}b".format(splits))
        bin_array = [i for i in bin]
        tmp_num = str(num_array[0])
        for index, value in enumerate(bin_array):
            if value == "0":
                tmp_num += num_array[index+1]
            else:
                sum += int(tmp_num)
                tmp_num = num_array[index+1]
        sum += int(tmp_num)
else:
    sum = num

print(sum)

Buggy submission (verdict: Runtime Error):

num = input()
num_array = [i for i in num]

splits = len(num) - 1
n = 2 ** splits

sum = 0

for i in range(n):
    bin = format(i, "0{}b".format(splits))
    bin_array = [i for i in bin]
    tmp_num = str(num_array[0])
    for index, value in enumerate(bin_array):
        if value == "0":
            tmp_num += num_array[index+1]
        else:
            sum += int(tmp_num)
            tmp_num = num_array[index+1]
    sum += int(tmp_num)

print(sum)
Problem p02817 (python)

Fixed submission:
S,T=map(str,input().split(" "))
print(T+S)

Buggy submission (verdict: Runtime Error):
s=input("")
t=input("")
print(str(s)+str(t))
Problem p02817 (python)

Fixed submission:
import sys

def main():
  ri=raw_input().split()
  if len(ri) > 0:
    print(str(ri[1]+ri[0]))


if __name__  == "__main__":
  try:
    main() #main
  #error IO Error
  except IOError as error:
    print("No file.")

Buggy submission (verdict: Runtime Error):
#import numpy as np
#import csv
import sys
#import time

def main():
  argv = sys.argv
  print(argv[2]+argv[1])


if __name__  == "__main__":
  try:
    main() #main
  #error IO Error
  except IOError as error:
    print("No file.")
Problem p02817 (python)

Fixed submission:
if __name__=="__main__":
    s,t=input().split()
    print(t+s)

Buggy submission (verdict: Runtime Error):
if __name__=="__main__":
    s,t=input.split()
    print(t+s)
Problem p03141 (python)

Fixed submission:
n=int(input())
a=[]
b=[]
c=[]
for i in range(n):
    s=input().split()
    A,B=int(s[0]),int(s[1])
    a.append(A)
    b.append(B)
    c.append(A+B)
c.sort(reverse=True)
s1=0
s2=0
for i in range(n):
    s1+=a[i]
    if i%2:
        s2+=c[i]
print(s1-s2)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=[]
b=[]
c=[]
for i in range(n):
    s=input().split()
    A,B=int(s[0]),int(s[1])
    a.append(A)
    b.append(B)
    c.append(A+B)
print(n,a,b,c,d)
c.sort(reverse=True)
s1=0
s2=0
for i in range(n):
    s1+=a[i]
    if i%2:
        s2+=c[i]
print(s1-s2)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=[]
b=[]
c=[]
d=[]
for i in range(n):
    A,B=int(input().split()[0]),int(input().split()[1])
    a.append(A)
    b.append(B)
    c.append(A+B)
    d.append(i)
d.sort(key=lambda x:c[x],reverse='True')
s1=0
s2=0
for i in range(n):
    s1+=a[i]
    if i%2==0:
        s2+=c[d[i]]
print(s1-s2)
Problem p02817 (python)

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

Buggy submission (verdict: Runtime Error):
s,t = input().split()
return t + s
Problem p02817 (python)

Fixed submission:
stdin = input().split()
print(stdin[1] + stdin[0])

Buggy submission (verdict: Runtime Error):
import math

prims = list()

prims.append(2)

base = int(input())

def _is_prim(n):
  global prims
  for p in prims:
    if n == p:
      return True
    elif n % p == 0:
      return False
  
  return True

# 入力値の平方根までの素数を作る
base_rt = int(math.sqrt(base))
for n in range(rt):
  if n < 2:
    continue
  elif n % 2 == 0:
    continue
  elif _is_prim(n):
    prims.append(n)

# 作った素数値で。。。
while not _is_prim(base):
  base += 1

print(base)
Problem p02817 (python)

Fixed submission:
S, T = input().split(" ")
print("{}".format(T+S))

Buggy submission (verdict: Runtime Error):

S, T = input().split(" ")
S = int(S)
T = int(T)
TS = T+S

print("{}".format(TS))
Problem p02817 (python)

Fixed submission:
S,T = input().split()
#print('{}{}'.format(T, S))
print(T+S)

Buggy submission (verdict: Runtime Error):
S,T = map(String, input().split())
print('{}{}'.format(T, S))

Buggy submission (verdict: Runtime Error):
S,T = map(string, input().split())
print('{}{}'.format(T, S))
Problem p02817 (python)

Fixed submission:
from sys import stdin
strings = list(stdin.readline().split())
print(strings[1] + strings[0])

Buggy submission (verdict: Runtime Error):
from sys import stdin
strings = list(stdin.readline().split())
print(string[1] + string[0])
Problem p02817 (python)

Fixed submission:
ST = input()
S, T = ST.split(" ")
print(T + S)

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

Fixed submission:
from fractions import gcd
A, B, C, D = list(map(int, input().split()))
num_B_C = B // C
num_B_D = B // D
lcm_C_D = int(C * D / gcd(C, D))
num_B = B - (num_B_C + num_B_D) + B // lcm_C_D

num_A_C = (A-1) // C
num_A_D = (A-1) // D
num_A = (A-1) - (num_A_C + num_A_D) + (A-1) // lcm_C_D

ans = num_B - num_A
print(ans)

Buggy submission (verdict: Runtime Error):
from math import gcd
A, B, C, D = list(map(int, input().split()))
num_B_C = B // C
num_B_D = B // D
lcm_C_D = int(C * D / gcd(C, D))
num_B = B - (num_B_C + num_B_D) + B // lcm_C_D

num_A_C = (A-1) // C
num_A_D = (A-1) // D
num_A = (A-1) - (num_A_C + num_A_D) + (A-1) // lcm_C_D

ans = num_B - num_A
print(ans)
Problem p03071 (python)

Fixed submission:
a, b = list(map(int, input().split()))
result = 0
for _ in range(2):
  if a >= b:
    result += a
    a -= 1
  else:
    result += b
    b -= 1
print(result)

Buggy submission (verdict: Runtime Error):
a, b = list(map(int, input().split))
result = 0
for _ range(2):
  if a >= b:
    result += a
    a -= 1
  else:"
    result += b
    b -= 1
print(result)
Problem p02817 (python)

Fixed submission:
L,R = input().split()
k = R + L
print (k)

Buggy submission (verdict: Runtime Error):
L,R = input().split()
print R + L

Buggy submission (verdict: Runtime Error):
a, b= (int(i) for i in input().split())
print b + a

Buggy submission (verdict: Runtime Error):
s = input()
t = input()
print (t + s)

Buggy submission (verdict: Runtime Error):
print (sys.argv[2]+ sys.argv[1])

Buggy submission (verdict: Runtime Error):
a[0] = input()
a[1] = input()
print (a[1] + a[0])

Buggy submission (verdict: Runtime Error):
a[0] = input()
a[1] = input()
print a[1] + a[0]

Buggy submission (verdict: Runtime Error):
a[0] = input()
a[1] = input()
print a[0] + a[1]
Problem p02817 (python)

Fixed submission:
string = input().split()
print(string[1] + string[0])

Buggy submission (verdict: Runtime Error):
string = int().split()
print(string[1] + string[0])
Problem p02817 (python)

Fixed submission:
a,b=input().split()
print(b+a)

Buggy submission (verdict: Runtime Error):
a,b=input(),split()
print(a+b)
Problem p02818 (python)

Fixed submission:
a,b,c=map(int,input().split())
if a >= c:
  print(a-c,b)
else:
  print(0,max(a+b-c,0))

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
if a>=k:
  print(a-k,b)
else:
  print(0,max(a+b-k,0))

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
if a >= c:
  print(a-c,0)
else:
  print(0.max(a+b-c,0))

Buggy submission (verdict: Runtime Error):
a,b,c=input().split()
if a >= c:
  print(a-c,b)
else:
  print(0,max(a+b-c,0))

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

for i in range(c)
	if a >= 1:
    	a -= 1
    elif b>= 1:
    	b -= 1
    else:

print(a b)
Problem p02921 (python)

Fixed submission:
S=input()
T=input()
x = 0
for i in range(3):
  if S[i] == T[i]:
    x += 1
print(x)

Buggy submission (verdict: Runtime Error):
S=list(map(int.input().split()))
T=list(map(int.input().split()))
x = 0
for i in range(3):
  if S[i] == T[i]:
    x += 1
print(x)

Buggy submission (verdict: Runtime Error):
S=list(map(int.input().split()))
T=list(map(int.input().split()))
int x = 0

for i in range(3):
  if S[i] == T[i]:
    x += 1
print(x)

Buggy submission (verdict: Runtime Error):
S=list(map(int.input().split()))
T=list(map(int.input().split()))
int x=0

for S[] in T[]:
  x += 1
  
print(x)
Problem p03455 (python)

Fixed submission:
a,b=map(int,input().split())
if (a*b)%2 == 1:
  print('Odd')
else:
  print('Even')

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

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if (a*b)%2 == 1:
  print(Odd)
else:
  print(Even)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
c=(a*b)%2
if c == 1:
  print(Odd)
else:
  print(Even)

Buggy submission (verdict: Runtime Error):
a,b=input().split()
c=(a*b)%2
if c == 1:
  print(Odd)
else:
  print(Even)

Buggy submission (verdict: Runtime Error):
a,b=input().split()
c=(a*b)%2
if c == 1:
  print("Odd")
else:
  print("Even")

Buggy submission (verdict: Runtime Error):
a,b=int(input().split())
c=(a*b)%2
if c==1:
  print("Odd")
else:
  print("Even")

Buggy submission (verdict: Runtime Error):
a,b=input().split()
c=(a*b)%2
if c==1:
  print("Odd")
else:
  print("Even")
Problem p03493 (python)

Fixed submission:
s=input()
print(s.count("1"))

Buggy submission (verdict: Runtime Error):
s=list(map(int,input().split()))
x=0
for i in 1:
  s[i] = 1
  x+=1
print(x)

Buggy submission (verdict: Runtime Error):
s=list(map(int,input().split()))
x=0
for s in 1:
  x+=1
print(x)
Problem p02993 (python)

Fixed submission:
import sys

S = input()

S = list(str(S))
for i in range(3):
    if S[i] == S[i+1]:
        result = "Bad"
        break
    else:
        result = "Good"
print(result)

Buggy submission (verdict: Runtime Error):
import sys
import fractions as fl

a, b, c, d = list(input().split())
a = int(a)
b = int(b)
c = int(c)
d = int(d)

#全体の個数
all = b - a + 1
#cとdの最小公倍数
e = c * d // fl.gcd(c, d)
# a以下でcまたはdで割れる個数
r1 = (a-1) // c + (a-1) // d - (a-1) // e
# b以下でcまたはdで割れる個数
r2 = b // c + b // d - b // e
ans = all - (r2 - r1)
print(ans)
Problem p02994 (python)

Fixed submission:
import sys
import math

n, l = list(input().split())
n = int(n)
l = int(l)

all = []
for i in range(n):
    all.append(l+i)
all_sum = sum(all)

minus = 10000
ans = 0
for i in range(len(all)):
    if math.fabs(all_sum - (all_sum - all[i])) < math.fabs(minus):
        minus = math.fabs(all_sum - (all_sum -all[i]))
        ans = all_sum -all[i]
print(ans)

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

args = sys.argv
n = args[0]
l = args[1]

n = int(n)
l = int(l)

all = []
for i in range(n):
    all.append(l+i)
all_sum = sum(all)

minus = 10000
ans = 0
for i in range(len(all)):
    if math.fabs(all_sum - (all_sum - all[i])) < math.fabs(minus):
        minus = math.fabs(all_sum - (all_sum -all[i]))
        ans = all_sum -all[i]
print(ans)

Buggy submission (verdict: Runtime Error):
import sys

args = sys.argv
n = args[0]
l = args[1]

n = int(n)
l = int(l)

all = []
for i in range(n):
    all.append(l+i)
all_sum = sum(all)

minus = 10000
ans = 0
for i in range(len(all)):
    if abs(all_sum - (all_sum - all[i])) < abs(minus):
        minus = abs(all_sum - (all_sum -all[i]))
        ans = all_sum -all[i]
print(ans)