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

Fixed submission:
b = input()

if b == "A":
    print("T")
elif b == "T":
    print("A")
elif b == "C":
    print("G")
elif b == "G":
    print("C")

Buggy submission (verdict: Runtime Error):
if b == "A":
    print("T")
elif b == "T":
    print("A")
elif b == "C":
    print("G")
elif b == "G":
    print("C")
Problem p03351 (python)

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

if abs(a -c) <= d:
    print("Yes")
elif abs(a - b) <= d and abs(b - c) <= d:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
d = int(input())

if c - a <= d:
    print("Yes")
elif b - a <= d and c - b <= d:
    print("Yes")
else:
    print("No")
Problem p03455 (python)

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

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

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
cin>>a>>b;
c = int()
c = a * b
if c % 2 == 1:
    print("Odd")
elif c % 2 == 0:
    print("Even")

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

if a * b % 2 == 1:
    print("Odd")
elif a * b % 2 == 0:
    print("Even")
Problem p03610 (python)

Fixed submission:
s = input()
x = ''
for i in range(0, len(s)):
    if i % 2 == 0:
        x = x + s[i]
print(x)

Buggy submission (verdict: Runtime Error):
s = input()
x = ''
for i in range(1, len(s) + 1):
    if i % 2 != 0:
        x = x + s[i]
print(x)
Problem p04011 (python)

Fixed submission:
N = int(input())
K = int(input())
X = int(input())
Y = int(input())

if N <= K:
    print(N * X)
else:
    print(K * X + (N - K) * Y)

Buggy submission (verdict: Runtime Error):
k, x, y, n = map(int, input().split())

if n <= k:
    print(n * x)
else:
    print(k*x+(n-k)*y)
# 演算子の左右に空白を入れる！
Problem p02706 (python)

Fixed submission:
N, M = map(int, input().split())
A = list(map(int,input().split()))
sum = 0

for i in range(M):
    sum += A[i]

if (N - sum) >= 0:
    print(N - sum)
else:
    print("-1")

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

for i in range(M):
    A_sum += int(input())

if (N - A_sum) > 0:
    print(N - A_sum)
else:
    print("-1")
Problem p03085 (python)

Fixed submission:
b = input()

if b == "A":
  print("T")
elif b == "T":
  print("A")
elif b == "G":
  print("C")
elif b == "C":
  print("G")

Buggy submission (verdict: Runtime Error):
b = input()

if b == "A":
  print("T")
elif S == "T":
  print("A")
elif S == "G":
  print("C")
elif S == "C":
  print("G")
Problem p02706 (python)

Fixed submission:

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

ans = N - sum(A)

if ans < 0:
    print(-1)
else:
    print(ans)

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

ans1 = sum(A)
ans2 = N - ans1

if sns2 < 0:
    print(-1)
else:
    print(ans2)
Problem p02784 (python)

Fixed submission:
'''
問題：
    アライグマはモンスターと戦っています。

    モンスターの体力は H です。
    アライグマは N 種類の必殺技を使うことができ、
    i 番目の必殺技を使うとモンスターの体力を Ai 減らすことができます。
    必殺技を使う以外の方法でモンスターの体力を減らすことはできません。

    モンスターの体力を 0 以下にすればアライグマの勝ちです。

    アライグマが同じ必殺技を
    2 度以上使うことなくモンスターに勝つことができるなら Yes を、
    できないなら No を出力してください。
'''

'''
制約：
    1 ≦ H ≦ 1000000000
    1 ≦ N ≦ 100000
    1 ≦ Ai ≦ 10000
    入力中のすべての値は整数である。
'''

# 標準入力から H, N, Ai を取得する
h, m = map(int, input().split())
a = list(map(int, input().split()))

# 必殺技を1回ずつ使った場合、モンスターの体力をどれだけ削れるか計算する
hissatsu_hp = 0
for i in range(0, m):
    hissatsu_hp += a[i]

# 同じ必殺技を使わずアライグマを倒せるか判定して結果を出力する
result = ""
if hissatsu_hp >= h:
    result = "Yes"
else:
    result = "No"

print(result)

Buggy submission (verdict: Runtime Error):
'''
問題：
    アライグマはモンスターと戦っています。

    モンスターの体力は H です。
    アライグマは N 種類の必殺技を使うことができ、
    i 番目の必殺技を使うとモンスターの体力を Ai 減らすことができます。
    必殺技を使う以外の方法でモンスターの体力を減らすことはできません。

    モンスターの体力を 0 以下にすればアライグマの勝ちです。

    アライグマが同じ必殺技を
    2 度以上使うことなくモンスターに勝つことができるなら Yes を、
    できないなら No を出力してください。
'''

'''
制約：
    1 ≦ H ≦ 1000000000
    1 ≦ N ≦ 100000
    1 ≦ Ai ≦ 10000
    入力中のすべての値は整数である。
'''

# 標準入力から H, N, Ai を取得する
h, m = map(int, input().split())
a = list(map(int, input().split()))

# 必殺技を1回ずつ使った場合、モンスターの体力をどれだけ削れるか計算する
# hissatsu_hp = 0
# for i in range(0, m):
#     hissatsu_hp += a[i]
hissatu_hp = sum(a)

# 同じ必殺技を使わずアライグマを倒せるか判定して結果を出力する
result = ""
if hissatsu_hp >= h:
    result = "Yes"
else:
    result = "No"

print(result)
Problem p02706 (python)

Fixed submission:
# abc163B
# https://atcoder.jp/contests/abc163/tasks/abc163_b

# 夏休みはN日間
# 夏休みの宿題はM個
# 宿題は同じ日に複数できない、宿題の時は遊ぶことはできない
# 最大何日間遊ぶことが出来るか
# 夏休み中に終わらせられない場合は、"-1"

# 入力
n, m = map(int, input().split())
a = list(map(int, input().split()))

# 処理
# 宿題にかかる合計日数
answer = n - sum(a)

if answer < 0:
    print("-1")
else:
    print(answer)

Buggy submission (verdict: Runtime Error):
# abc163B
# https://atcoder.jp/contests/abc163/tasks/abc163_b

# 夏休みはN日間
# 夏休みの宿題はM個
# 宿題は同じ日に複数できない、宿題の時は遊ぶことはできない
# 最大何日間遊ぶことが出来るか
# 夏休み中に終わらせられない場合は、"-1"

# 入力
n = int(input())
m = int(input())
a = list(map(int, input().split()))

# 処理
answer = n - sum(a)

if answer > 0:
    print(answer)
else:
    print("-1")
Problem p03455 (python)

Fixed submission:
# 086A
# 入力値の積が偶数か奇数か


# 入力
a, b = map(int, input().split())

# 処理
x = a * b % 2

if x == 0:
    print("Even")
else:
    print("Odd")

Buggy submission (verdict: Runtime Error):
# 入力
a = int(input())
b = int(input())

# 処理
if a * b % 2 == 0:
    answer = "Even"
else:
    answer = "Odd"

print(answer)

Buggy submission (verdict: Runtime Error):
# 入力
a = int(input("a:"))
b = int(input("b:"))

# 処理
if a * b % 2 == 0:
    answer = "Even"
else:
    answer = "Odd"

print(answer)
Problem p03943 (python)

Fixed submission:
# 3個のパックにそれぞれ、a,b,c個のキャンディーが入っている
# キャンディーを2人に分ける際、個数が等しくなるか判定

# 入力
a, b, c = map(int, input().split())

# 処理
if a == b + c or b == a + c or c == a + b:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
# 3個のパックにそれぞれ、a,b,c個のキャンディーが入っている
# キャンディーを2人に分ける際、個数が等しくなるか判定

# 入力
a = int(input())
b = int(input())
c = int(input())

# 処理
if a == b + c or b == a + c or c == a + b:
    print("Yes")
else:
    print("No")
Problem p04011 (python)

Fixed submission:
# abc044_a
# https://atcoder.jp/contests/abc044/tasks/abc044_a

# 最初のK泊までは、X円
# K＋1泊目以降は、Y円

# N泊連続で宿泊した際の宿泊費

# 入力
n = int(input())
k = int(input())
x = int(input())
y = int(input())

# 処理

# x円とy円
if n > k:
    answer = k * x + (n - k) * y
# x円のみ
else:
    answer = n * x

print(answer)

Buggy submission (verdict: Runtime Error):
# abc044_a
# https://atcoder.jp/contests/abc044/tasks/abc044_a

# 最初のK泊までは、X円
# K＋1泊目以降は、Y円

# N泊連続で宿泊した際の宿泊費

# 入力
n, k, x, y = map(int, input().split())

# 処理

# x円とy円
if n > k:
    answer = k * x + (n - k) * y
# x円のみ
else:
    answer = n * x

print(answer)
Problem p04029 (python)

Fixed submission:
# 043A
# N人の時のキャンディーの合計数
# 入力値 子供の人数

# 入力
n = int(input())

# 処理
answer = (n + 1) * n // 2

print(answer)

Buggy submission (verdict: Runtime Error):
# 043A
# N人の時のキャンディーの合計数
# 入力値 子供の人数

# 入力
 = int(input())

# 処理
answer = (n + 1) * n / 2

print(answer)
Problem p02772 (python)

Fixed submission:


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




for i in range(N):
    if A[i] % 2 == 0:
        if A[i] % 3 != 0 and A[i] % 5 != 0:
            print('DENIED')
            exit()

else:
    print('APPROVED')

Buggy submission (verdict: Runtime Error):







for i in range(N):
    if A[i] % 2 == 0:
        if A[i] % 3 != 0 and A[i] % 5 != 0:
            print('DENIED')
            exit()

else:
    print('APPROVED')
Problem p03351 (python)

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

if d >= abs(a - c) or (d >= abs(a - b) and d >= abs(b - c)):
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
a、b、c、d  =  map（int、input（）。split（））
if abs(a - c) <= d:
    print('Yes')
elif abs(a - b) <= d and abs(b - c) <=d:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):

using namespace std;
int main()
int a,b,c,d;
cin >>a>>b>>c>>d;
if(abs(a-c)<=d || (abs(a-b)<=d && abs(b-c)<=d)) puts("Yes");
else puts("No");

Buggy submission (verdict: Runtime Error):

using namespace std;
int main(){
int a,b,c,d;
cin >>a>>b>>c>>d;
if(abs(a-c)<=d || (abs(a-b)<=d && abs(b-c)<=d)) puts("Yes");
else puts("No");

Buggy submission (verdict: Runtime Error):
#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,c,d;
cin >>a>>b>>c>>d;
if(abs(a-c)<=d || (abs(a-b)<=d && abs(b-c)<=d)) puts("Yes");
else puts("No");

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

if abs (a - c) <= d:
    print('Yes')
elif abs(a - b) <= d:
    print('Yes')
elif abs(b - c) <= d:
if d >= abs(a - c) or (d >= abs(a - b) and d >= abs(b - c)):
    print('Yes')
else:
    print('No')
Problem p02612 (python)

Fixed submission:
print(-int(input())%1000)

Buggy submission (verdict: Runtime Error):
pritn(-int(input())%1000)
Problem p02772 (python)

Fixed submission:
S_list = [input() for i in range(2)]
S_list_1 = list(map(int,S_list[1].split()))

for i in S_list_1:   
    if i % 2 == 0 :
        if i % 3 !=0 and i % 5 !=0 :
            result="DENIED"
            break
    else:
        result="APPROVED"        
print(result)

Buggy submission (verdict: Runtime Error):
S_list = [input() for i in range(2)]
S_list_1 = S_list[1].split()

for i in S_list_1:   
    if int(i) % 2 == 0 :
        if i % 3 !=0 and i % 5 !=0 :
            result="DENIED"
            break
    else:
        result="APPROVED"        
print(result)

Buggy submission (verdict: Runtime Error):
S_list = [input() for i in range(2)]
S_list_1 = S_list[1].split()
even_list = []
for i in S_list_1:   
    if int(i) % 2 == 0:
        even_list.append(int(i))
for i in even_list:
    if i % 3 ==0 or i % 5 ==0 :
        result="APPROVED"
    else:
        result="DENIED"
        break
print(result)
Problem p02981 (python)

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

Buggy submission (verdict: Runtime Error):
S_list = list(map(int,input().split()))
n,a,b = S_list
print(min(n * a ,b)
Problem p03693 (python)

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

r, g, b = S_list[0], S_list[1], S_list[2]
if (100 * r + 10 * g + b) % 4 == 0 :
    result = "YES"
else:
    result = "NO"
print(result)

Buggy submission (verdict: Runtime Error):
S_list = list(map(int,input().split()))
 
r, g, b = S_list
if (ｒ ＋ g + b) % 4 == 0 :
    result = "YES"
else:
    result = "NO"
print(result)
Problem p03759 (python)

Fixed submission:
S_list = list(map(int,input().split()))
 
if  S_list[1] - S_list[0] == S_list[2] - S_list[1]:
    result = "YES"
else:
    result = "NO"
print(result)

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

if  (S_list[1] - S_list[0] ) / (S_list[2] - S_list[1]) == 1:
    result = "YES"
else:
    result = "NO"
print(result)

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

if  (S_list[1] - S_list[0] ) / (S_list[2] - S_list[1]) == 1:
    result = "YES"
else:
    result = "No"
print(result)

Buggy submission (verdict: Runtime Error):
S_list = list(map(int,input("入力：").split()))

if  (S_list[1] - S_list[0] ) / (S_list[2] - S_list[1]) == 1:
    result = "YES"
else:
    result = "No"
print(result)
Problem p02909 (python)

Fixed submission:
# Sunny -> Cloudy -> Rainy -> Sunny ...
# 標準入力はSunny Cloudy Rainyのいずれか

S = input()

if S == "Sunny":
    print("Cloudy")
elif S == "Cloudy":
    print("Rainy")
elif S == "Rainy":
    print("Sunny")

Buggy submission (verdict: Runtime Error):
# Sunny -> Cloudy -> Rainy -> Sunny ...
# 標準入力NはSunny Cloudy Rainyのいずれか

N = input()

if N == "Sunny":
    print("Cloudy"):
elif N == "Cloudy":
    print("Rainy"):
elif N == "Rainy":
    print("Sunny")
Problem p03455 (python)

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

X = a*b
if X%2 ==1:
    print('Odd')
else:
    print('Even')

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

X = a*b
if X%2 ==1:
    print('Odd')
else:
    print('Even')
Problem p03605 (python)

Fixed submission:
N = input()

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

Buggy submission (verdict: Runtime Error):
if "9" == N[0] or "9" == N[1]:
        print( "YES" )
else:
    print( "NO" )
Problem p03943 (python)

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

if ( a + b == c ) or ( a + c == b ) or ( b + c == a ) :
    print ( "Yes" )
else:
    print ( "No" )

Buggy submission (verdict: Runtime Error):
if ( a + b == c ) or ( a + c == b ) or ( b + c == a ) :
    print ( "Yes" )
else:
    print ( "No" )
Problem p02981 (python)

Fixed submission:
N, A, B = map(int, input().split())
print(min(N * A, B))

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

c = n*a
if c >= b:
print(b)
else:
print(c)
Problem p03351 (python)

Fixed submission:
#配列の準備
# ンプット分を数値型に変換後、スプリットで各変数に持たせる

a,b,c,d=map(int,input().split())
# abs関数で引数を絶対値とする。

if abs(c-a)>d:
  if abs(a-b)>d or abs(b-c)>d:
    print("No")
  else:
    print("Yes")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
#配列の準備
＃インプット分を数値型に変換後、スプリットで各変数に持たせる

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

＃abs関数で引数を絶対値とする。
if abs(c-a)>d:  
  if abs(a-b)>d or abs(b-c)>d:  
    print("No")  
  else:  
    print("Yes")  
else:  
  print("Yes")
Problem p02706 (python)

Fixed submission:
N, M = map(int, input().split())
a = list(map(int, input().split()))
homework = 0

for i in range(M):
    homework += a[i]

play = N - homework

if play < 0:
    print(-1)
else:
    print(play)

Buggy submission (verdict: Runtime Error):
N = int(input())
M = int(input())
list =[]
homework = 0

for A in range(0, M):
    list.append(int(input()))
    homework = homework + list[A]

play = N - homework

if play < 0:
    print(-1)
else:
    print(play)
Problem p03351 (python)

Fixed submission:
a, b, c, d = (int (i) for i in input().split())

if abs(a - c) <= d:
    print("Yes")
elif (abs(a - b) <= d) and (abs(b - c) <= d):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
d = int(input())

if abs(a - c) <= d:
    print("Yes")
elif (abs(a - b) <= d) and (abs(b - c) <= d):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
d = int(input())

if abs(a - c) <= d:
    print("Yes")
elif (abs(a - b) <= d) and (abs(b - c) <= d):
    print("Yes")
else:
    print("No")
Problem p03455 (python)

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

if a*b % 2 == 0:
    print('Even')
else:
    print('Odd')

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

if a*b % 2 == 0:
    print('Even')
else:
    print('Odd')

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

if a*b%2 == 0:
    print('Even')
else:
    print('Odd')
Problem p02657 (python)

Fixed submission:
# 169A
# A * B を整数として出力せよ

# 1.　入力をプログラムで扱えるように受け取ること
a, b = map(int, input().split())
# print(a, b)

# 2.　受け取った入力値を使って、適切に処理（計算）すること
answer = a * b

# 3.　計算した結果を出力する
print(answer)

Buggy submission (verdict: Runtime Error):
# map関数:map(関数,リスト) リストのすべての要素に関数を適用する
# split関数:変数名.split() 変数を区切る
# split関数は文字列型の為、数字に認識させるためにintを入れる
answer = a * b

print(answer)

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())

answer = A * B
print(answer)
Problem p03455 (python)

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

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

x =  a * b 

if x % 2 == 0:
    print("Even")
else:
    print("odd")

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

answer = ( a * b )

if answer % 2 == 0:
    print("Even")
else:
    print("odd")

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

x = ( a * b )

if x % 2 == 0:
    print("Even")
else:
    print("odd")

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

x = ( a * b )

if x % 2 == 0:
    print("Even")
else:
    print("odd")

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

x = ( a * b )

if x % 2 == 0:
    print("Even")
elif x % 2 != 0:
    print("odd")

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

x = ( a * b )

if x % 2 == 0:
    print("Even")
if x % 2 != 0:
    print("odd")

Buggy submission (verdict: Runtime Error):
x = ( a * b )

if x % 2 == 0:
    print("Even")
if x % 2 != 0:
    print("odd")
Problem p03145 (python)

Fixed submission:
AB, BC, CA = map(int, input().split())
if (1 <= AB & AB <= 100) & (1 <= BC & BC <= 100) & (1 <= CA & CA <= 100):
    S = int(AB * BC / 2)
    print(S)

Buggy submission (verdict: Runtime Error):
AB, BC, CA = map(int, input().split())
if (1 <= AB & AB <= 100) & (1 <= BC & BC <= 100) & (1 <= CA & CA <= 100)
    S = int(AB * BC / 2)
    print(S)
Problem p03729 (python)

Fixed submission:
# 060_a
A, B, C = input().split()

if (1<=len(A) and len(A)<=10 and A.islower()) and (1<=len(B) and len(B)<=10 and B.islower())\
        and (1<=len(C) and len(C)<=10 and C.islower()):
    if (A[len(A) - 1] == B[0]) and (B[len(B) - 1] == C[0]):
        print('YES')
    else:
        print('NO')

Buggy submission (verdict: Runtime Error):
# 060_a
A, B, C = input().split()

if (1<=len(A) and len(A)<=10 and A.islower()) and (1<=len(B) and len(B)<=10 and B.islower())\
        and (1<=len(C) and len(C)<=10 and C.islower()):
    if (A[len(A) - 1] == B[0]) and (B[0] == C[len(B) - 1]):
        print('YES')
    else:
        print('NO')
Problem p03610 (python)

Fixed submission:
S = str(input())

print(S[::2])

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

for i in range(len(s)):

    if i % 2 == 0:
        odd_num.append(s[i])

answer = ''.join(odd_num)
print(answer)



s = input()
print(s[::2])

Buggy submission (verdict: Runtime Error):
OddString
Problem p02657 (python)

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

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())

print(A * B)

Buggy submission (verdict: Runtime Error):
print(a)
print(b)

answer = a * b

print(answer)
Problem p02687 (python)

Fixed submission:
# ABC が開催された次の週には ARC が開催され、ARC が行われた次の週には ABC が開催
# 先週開催されたコンテストを表す文字列Sが与えられる
# 制約: S は ABC または ARC
# S = 'ABC'

S = input()

if S == 'ABC':
    print('ARC')
else:
    print('ABC')

Buggy submission (verdict: Runtime Error):
# ABC が開催された次の週には ARC が開催され、ARC が行われた次の週には ABC が開催
# 先週開催されたコンテストを表す文字列Sが与えられる
# 制約: S は ABC または ARC
# S = 'ABC'

if S == 'ABC':
    print('ARC')
else:
    print('ABC')
Problem p02706 (python)

Fixed submission:
N, M = map(int, input().split())
A = map(int, input().split())
print(max(N - sum(A), -1))

Buggy submission (verdict: Runtime Error):
day, assignment = map(int, input().split())
assignment_time = map(int, input().split())
if sum(assignment_time) > N:
    print(-1)
else:
    print(N - sum(assignment_time))
Problem p03106 (python)

Fixed submission:
integer1, integer2, term = map(int, input().split())
term_value = max(integer1, integer2)
largest_term = 0
while term_value <= 100:
    if integer1 % term_value == 0 and integer2 % term_value == 0:
        largest_term += 1
    if term == largest_term:
        break
    term_value -= 1
print(term_value)

Buggy submission (verdict: Runtime Error):
A, B, K = map(int, input().split())
print((i for i in range(1, 101) if A % i + B % i < 1)[-K])
Problem p03145 (python)

Fixed submission:
AB, BC, CA = map(int, input().split())
print(int(AB * BC / 2))

Buggy submission (verdict: Runtime Error):
length1, length2, length3 = map(int, input().split())
area = AB * BC / 2
print(int(area))
Problem p03447 (python)

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

Buggy submission (verdict: Runtime Error):
X, A, B = map(int, input().split())
print((X - A) % B)
Problem p03501 (python)

Fixed submission:
N, A, B = map(int, input().split())
print(min(N * A, B))

Buggy submission (verdict: Runtime Error):
N, A, B = map(int, input().split)
print(min(N * A, B))
Problem p03555 (python)

Fixed submission:
print(('NO', 'YES')[input() == input()[::-1]])

Buggy submission (verdict: Runtime Error):
a, b = input().split()
if a[0] == b[2] and a[1] == b[1] and a[2] == b[0]:
    print("YES")
else:
    print("NO")
Problem p03563 (python)

Fixed submission:
R, G = (int(input()) for i in range(2))
print(G * 2 - R)

Buggy submission (verdict: Runtime Error):
print(-input() + input() * 2)
Problem p03719 (python)

Fixed submission:
A, B, C = map(int, input().split())
print('Yes' if A <= C <= B else 'No')

Buggy submission (verdict: Runtime Error):
A, B, C = map(int, input().split())
print('YES' if a <= c <= b else 'NO')
Problem p03844 (python)

Fixed submission:
print(eval(input()))

Buggy submission (verdict: Runtime Error):
A, op, B = input().split()
A, B = int(A), int(B)
if op == '+'
    print(A + B)
else:
    print(A - B)
Problem p04011 (python)

Fixed submission:
N, K, X, Y = (int(input()) for i in range(4))
print(K * X + (N - K) * Y if N > K else N * X)

Buggy submission (verdict: Runtime Error):
total_stay = int(input())
normal_stay = int(input())
normal_cost = int(input())
discounted_cost = int(input())
if total_stay <= normal_stay:
  total_cost = total_stay * normal_cost
else:
  total_cost = normal_stay * normal_cost + (total_stay - normal_stay) * discounted_cost
print(P)
Problem p02687 (python)

Fixed submission:
# 入力
S = input()

# 処理&出力
if S == 'ABC':
    print('ARC')
elif S == 'ARC':
    print('ABC')
else:
    print('IDK')

Buggy submission (verdict: Runtime Error):
a、b  =  map（int、input（）。split（））
印刷（a  *  b）

Buggy submission (verdict: Runtime Error):
#include <iostream>
2 using namespace std;
3 int main(){
4 string s;
5 cin >> s;
6 if(s == "ABC"){
7 cout << "ARC" << endl;
8 }else{
9 cout << "ABC" << endl;
10 }
11 }
Problem p02658 (python)

Fixed submission:
n=int(input())
arr=list(map(int,input().split()))
arr=sorted(arr) #配列を昇順ソートしておく(配列に0がある場合0が先頭に来るので、場合分けの必要がなくなる)
ans=1
for val in arr:
 ans*=val #Pythonは多倍長整数をサポートしているので単に積を求めれば十分
 if ans>10**18:
   print(-1)
   break
else:
 print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(input().split())

A = sorted(A)
result = 1
max = 10**18
for a in A:
    result *= a
    if result > max:
        print(-1)
        break
    else:
        print(result)
Problem p02898 (python)

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

result = 0

for h in heights:
    if h >= K:
        result += 1
print(result)

Buggy submission (verdict: Runtime Error):
result = 0

for h in heights:
    if h >= K:
        result += 1
print(result)
Problem p03844 (python)

Fixed submission:
a = eval(input())
print(a)

Buggy submission (verdict: Runtime Error):
a = input()

if a[2] == "+":
    answer = int(a[0]) + int(a[4])
elif a[2] == "-":
    answer = int(a[0]) - int(a[4])
else:
    print('該当しない')

print(answer)

Buggy submission (verdict: Runtime Error):
a = input()

if a[2] == "+":
    answer = int(a[0]) + int(a[4])
elif a[2] == "-":
    answer = int(a[0]) - int(a[4])

print(answer)
Problem p02784 (python)

Fixed submission:
# アライグマはモンスターと戦っています。モンスターの体力はHです。
# アライグマはN種類の必殺技を使うことができ、i番目の必殺技を使うとモンスターの体力を Ai
# 減らすことができます。 必殺技を使う以外の方法でモンスターの体力を減らすことはできません。
# モンスターの体力を0以下にすればアライグマの勝ちです。
# アライグマが同じ必殺技を2度以上使うことなくモンスターに勝つことができるなら Yes を、
# できないなら No を出力してください。

H, N = map(int, input().split())
damege = map(int, input().split())

total_damege = sum(damege)

if H - total_damege <= 0:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):

H, N = map(int, input().split())
damege = map(int, input().split())
damege_list = [damege]

damege.sort()

if H - (damege[-1] + damege[-2]) <= 0:
    print('Yes')
else:
    print('No')

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

damege.sort()

if H - (damege[-1] + damege[-2]) <= 0:
    print('Yes')
else:
    print('No')