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

Fixed submission:
# https://atcoder.jp/contests/abc068/tasks/arc079_a
# C - Cat Snuke and a Voyage

n, m = list(map(int, input().split()))
ab_list = []

for _ in range(m):
    a, b = list(map(int, input().split()))
    ab_list.append((a, b))

ab_dict = {k: [] for k in range(1, m+1)}

# 1と接続している島
via_nodes_1 = set([b for a, b in ab_list if a == 1])
via_nodes_2 = set([a for a, b in ab_list if b == n])

# 積集合があるか
via_nodes = via_nodes_1 & via_nodes_2

if len(via_nodes):
    ans = 'POSSIBLE'
else:
    ans = 'IMPOSSIBLE'

print(ans)

Buggy submission (verdict: Runtime Error):
# https://atcoder.jp/contests/abc068/tasks/arc079_a
# C - Cat Snuke and a Voyage

n, m = list(map(int, input().split()))
ab_list = []

for _ in range(m):
    a, b = list(map(int, input().split()))
    ab_list.append((a, b))

ab_dict = {k: [] for k in range(1, m+1)}

for a, b in ab_list:
    # 子供を覚えさせる
    ab_dict[a].append(b)

next_node_list = ab_dict[1]
# 来訪済の島
done_list = []
done_list.append(1)

def search(node_list):
    for node in node_list:
        if node == n:
            return True

    return False

# 深さ優先探索
for node in next_node_list:
    if node not in ab_dict.keys():
        # 行き止まり
        is_ok = False
        continue

    if node == n:
        is_ok = True
    else:
        is_ok = search(ab_dict[node])
    if is_ok:
        break

ans = 'POSSIBLE' if is_ok else 'IMPOSSIBLE'
print(ans)
Problem p03671 (python)

Fixed submission:
a, b, c = list(map(int, input().split()))
values = sorted([a, b, c])
ans = values[0] + values[1]
print(ans)

Buggy submission (verdict: Runtime Error):
a, b, c = list(map(int, input().split()))
values = sorted(list(set([a, b, c])))
ans = values[0] + values[1]
print(ans)
Problem p03680 (python)

Fixed submission:
# https://atcoder.jp/contests/abc065/tasks/abc065_b
# B - Trained?
n = int(input().split()[0])

index2number_dict = {}
number2index_dict = {}
button_list = []

for _ in range(n):
    number = int(input().split()[0])
    button_list.append(number)
    

# ボタンが光っているときに押すと、
# 今のボタンの光が消える
# 次のボタンが光る
# ボタン2が光っている状態でやめたい
# print(index2number_dict)

start_index = 1
# print(start_number)
# print(start_index)

step = 0
lighting_index = start_index # 1 - n
status_list = ''
can_stop = False

while True:
    status_list += str(lighting_index)

    lighting_number = button_list[lighting_index - 1]
    lighting_index = lighting_number  # 次のインデックス
    step += 1


    if lighting_index == 2:
        can_stop = True
        break

    if step >= len(button_list):
        break
    # print('i = {}, ai = {}'.format(lighting_index, lighting_number))
    

    # print('Next -> i = {}, a_i = {} '.format(lighting_index, lighting_number))
    

if not can_stop:
    step = -1

# print('===========')
# print(status_list)
print(step)

Buggy submission (verdict: Runtime Error):
# https://atcoder.jp/contests/abc065/tasks/abc065_b
# B - Trained?
n = int(input().split()[0])

index2number_dict = {}
number2index_dict = {}

for i in range(n):
    a_i = int(input().split()[0])
    index2number_dict[i+1] = a_i
    number2index_dict[a_i] = i+1

# ボタンが光っているときに押すと、
# 今のボタンの光が消える
# 次のボタンが光る
# ボタン2が光っている状態でやめたい
# print(index2number_dict)

start_number = 1
start_index = number2index_dict[start_number]
# print(start_number)
# print(start_index)

step = 0
lighting_number = start_number
lighting_index = start_index
status_list = str(lighting_number)
can_stop = False

while True:
    step += 1
    lighting_number = index2number_dict[lighting_number]
    
    if lighting_number == 2:
        can_stop = True
        break

    status_list += str(lighting_number)

    if len(status_list) % 2 == 0:
        half = len(status_list) // 2
        # print('status(full): {}'.format(status_list))
        # print('status(half): {}'.format(status_list[:half]))

        if status_list == status_list[:half] * 2:
            break

if not can_stop:
    step = -1

# print('===========')
# print(status_list)
print(step)
Problem p03759 (python)

Fixed submission:
a, b, c = list(map(int, input().split()))
print('YES' if b - a == c - b else 'NO')

Buggy submission (verdict: Runtime Error):
a, b, c = list(input().split())
print('YES' if b - a == c - b else 'NO')
Problem p03777 (python)

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

Buggy submission (verdict: Runtime Error):
a, b = list(map(int, input().split()))
if a == 'H':
  b = 'D' if b == 'H' else 'H'
print(b)
Problem p03844 (python)

Fixed submission:
a, op, b = list(input().split())
a, b = int(a), int(b)
if op == '+':
  ans = a + b
else:
  ans = a - b
print(ans)

Buggy submission (verdict: Runtime Error):
a, op, b = list(input().split())
if op == '+':
  ans = a + b
else:
  ans = a - b
print(ans)
Problem p04031 (python)

Fixed submission:
# https://atcoder.jp/contests/abc043/tasks/arc059_a
# C - いっしょ / Be Together
import statistics
N = int(input().split()[0])
a_list = list(map(int, input().split()))

# たかだか200なので、全探索で間に合う
min_cost = float('inf')

for x in range(-100, 101):
    cost = 0
    for a in a_list:
        cost += (a - x) ** 2
    if cost < min_cost:
        min_cost = cost

print(min_cost)

Buggy submission (verdict: Runtime Error):
# https://atcoder.jp/contests/abc043/tasks/arc059_a
# C - いっしょ / Be Together
import statistics
N = int(input().split()[0])
a_list = list(map(int, input().split()))

min_a, max_a = min(a_list), max(a_list)
w_list = list(range(min_a, max_a+1))
m1 = statistics.median_low(w_list)
m2 = statistics.median_high(w_list)

cost_1 = 0
cost_2 = 0
for a in a_list:
    cost_1 += (a - m1) ** 2
    cost_2 += (a - m2) ** 2

ans = min(cost_1, cost_2)
print(ans)
Problem p02640 (python)

Fixed submission:
x , y = map(int,input().split())
if y % 2 != 0 :
    print("No")
    quit()
else:
    b = y/2 - x
    a = x - b 
    if a >= 0 and b >= 0:
        print("Yes")
    else:
        print("No")

Buggy submission (verdict: Runtime Error):
    x , y = map(int,input().split())
b = y/2 - x 
a = x - b 
if a >=0 and b>= 0:
    print("Yes")
else:
    print("No")
Problem p02664 (python)

Fixed submission:
t = input()
print(t.replace('?', 'D'))

Buggy submission (verdict: Runtime Error):
    t=input()
    print(t.replace("?","D"))
Problem p02765 (python)

Fixed submission:
n,m = map(int,input().split())
if n < 10:
    print(m+(100*(10-n)))
else:
   print(m)

Buggy submission (verdict: Runtime Error):

n,m = map(int.input().split())
if n < 10:
    print(m+(100*(10-n)))
else:
   print(m)
Problem p02778 (python)

Fixed submission:

get = input()
print(''.join('x' for i in range(len(get))))

Buggy submission (verdict: Runtime Error):

get = input()
for i in range(len(get)):
    print("x".end="")
Problem p03059 (python)

Fixed submission:
a, b, t = map(int,input().split())
i = 1
bisket = 0

while t+0.5 > i*a:
    bisket += b
    i += 1

print(bisket)

Buggy submission (verdict: Runtime Error):
inputstr1 = input().split()
n = inputstr1[0]
k = inputstr1[1]
s = input()

chars = list(s)
chars[int(k)-1]=chars[int(k)-1].lower()
correct = "".join(chars)
print(correct)
Problem p03061 (python)

Fixed submission:
from fractions import gcd
from functools import reduce
N = int(input())
A = list(map(int, input().split()))

L = [0] * (N+1)
R = [0] * (N+1)
for i in range(N):
    L[i+1] = gcd(L[i], A[i])
    R[N-i-1] = gcd(R[N-i], A[N-i-1])

max_m = 0
for i in range(N):
    m = gcd(L[i], R[i+1])
    if max_m < m:
        max_m = m
print(max_m)

Buggy submission (verdict: Runtime Error):
from functools import reduce
from fractions import gcd
#from math import gcd

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

gcd_all = reduce(gcd, A)
list = []

for i in range(N):
    #gcd_1 = reduce(gcd, (A[:i]+A[i+1:]))
    for j in range(N):
        if i == j:
            continue
        list.append(gcd(A[i],A[j]))
    #print(list)
    #print(max(list))
    if gcd_all == max(list):
        index = i
        #print(index)
    list = []

    #if gcd_1 >= gcd_all:
     #   gcd_all = gcd_1
A.pop(index)
print(reduce(gcd, A))
#print(gcd_all)

Buggy submission (verdict: Runtime Error):
from functools import reduce
from fractions import gcd
from math import gcd

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

gcd_all = reduce(gcd, A)
list = []

for i in range(N):
    #gcd_1 = reduce(gcd, (A[:i]+A[i+1:]))
    for j in range(N):
        if i == j:
            continue
        list.append(gcd(A[i],A[j]))
    #print(list)
    #print(max(list))
    if gcd_all == max(list):
        index = i
        #print(index)
    list = []

    #if gcd_1 >= gcd_all:
     #   gcd_all = gcd_1
A.pop(index)
print(reduce(gcd, A))
#print(gcd_all)

Buggy submission (verdict: Runtime Error):
import functools
import math
import fractions

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

#gcd_all = functools.reduce(math.gcd, A)
gcd_all = functools.reduce(fractions.gcd, A)
#print(gcd_all)

for i in range(N):
    list = A[:i] + A[i+1:]
    #print(list)
    #gcd_1 = functools.reduce(math.gcd, list)
    gcd_1 = functools.reduce(fractions.gcd, list)
    #print(gcd_1)
    if gcd_1 >= gcd_all:
        index = i
        value = gcd_1
        gcd_all = gcd_1

A[index] = value

print(functools.reduce(math.gcd, A))

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

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

gcd_all = functools.reduce(math.gcd, A)
#print(gcd_all)

for i in range(N):
    list = A[:i] + A[i+1:]
    #print(list)
    gcd_1 =  functools.reduce(math.gcd, list)
    #print(gcd_1)
    if gcd_1 >= gcd_all:
        index = i
        value = gcd_1
        gcd_all = gcd_1

A[index] = value

print(functools.reduce(math.gcd, A))

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

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

gcd_all = functools.reduce(math.gcd, A)
#print(gcd_all)

for i in range(N):
    list = A[:i] + A[i+1:]
    #print(list)
    gcd_1 =  functools.reduce(math.gcd, list)
    #print(gcd_1)
    if gcd_1 >= gcd_all:
        index = i
        value = gcd_1
        gcd_all = gcd_1

A[index] = value

print(functools.reduce(math.gcd, A))
Problem p03076 (python)

Fixed submission:
i = [int(input()) for i in range(5)]
i2 = [i2 for i2 in i if i2%10 != 0]

if not i2:
    min = i[len(i)-1]

else:
    min = i2[len(i2)-1]

count = 0
for x in i:
    if 0 < x % 10 < min % 10:
        min = x
        count += 1
i.remove(min)

for x in i:
    if x % 10 != 0:
        index = i.index(x)
        x += 10 - x % 10
        i[index] = x

i.append(min)

print(sum(i))

Buggy submission (verdict: Runtime Error):
i = [int(input()) for i in range(5)]
i2 = [i2 for i2 in i if i2%10 != 0]
min == 0
min=i2[len(i2)-1]
if min == 0:
    min == i[len(i)]
count = 0
for x in i:
    if 0 < x % 10 < min % 10:
        min = x
        count += 1
i.remove(min)

for x in i:
    if x % 10 != 0:
        index = i.index(x)
        x += 10 - x % 10
        i[index] = x

i.append(min)

print(sum(i))

Buggy submission (verdict: Runtime Error):
i = [int(input()) for i in range(5)]
i2 = [i2 for i2 in i if i2%10 != 0]
min=i2[len(i2)-1]
count = 0
for x in i:
    if 0 < x % 10 < min % 10:
        min = x
        count += 1
i.remove(min)

for x in i:
    if x % 10 != 0:
        index = i.index(x)
        x += 10 - x % 10
        i[index] = x

i.append(min)

print(sum(i))

Buggy submission (verdict: Runtime Error):
list = [int(input()) for i in range(5)]
t = 0
cnt_l = []
for i in range(5):
    cnt = 0
    while list[i] % 10 != 0:
        list[i] += 1
        cnt += 1
    t += list[i]
    if cnt != 0:
        cnt_l.append(cnt)
if not cnt:
    cnt.append(0)
print(t - max(cnt_l))

Buggy submission (verdict: Runtime Error):
list = [int(input()) for i in range(5)]
t = 0
cnt_l = []
for i in range(5):
    cnt = 0
    while list[i] % 10 != 0:
        list[i] += 1
        cnt += 1
    t += list[i]
    if cnt != 0:
        cnt_l.append(cnt)
if not cnt:
    cnt.append(0)
print(t - max(cnt_l))

Buggy submission (verdict: Runtime Error):
i = [int(input()) for i in range(5)]
min = 9
for x in i:
    if 0 <  x % 10 < min % 10:
        min = x
i.remove(min)

for x in i:
    if x % 10 != 0:
        index = i.index(x)
        x += 10 - x % 10
        i[index] = x

i.append(min)
print(sum(i))
Problem p03087 (python)

Fixed submission:
n, q = map(int, input().split())
s = input()
x = [0]*(n+1)

for i in range(n):
    x[i+1] = x[i] + (1 if s[i:i+2] == "AC" else 0)

for i in range(q):
    l, r = map(int, input().split())
    print(x[r-1] - x[l-1])

Buggy submission (verdict: Runtime Error):
n, q = map(int, input().split())
s = input()
x = []*(n+1)

for i in range(n):
    x[i+1] = x[i] + (1 if s[i:i+2] == "AC" else 0)

for i in range(q):
    l, r = map(int, input().split())
    print(x[r-1] - x[l-1])

Buggy submission (verdict: Runtime Error):
n, q = map(int, input().split())
s = input()
x = []

for i in range(q):
    s1, e1 = [int(i) for i in input().split()]
    x.append(s[s1-1:e1])

for i in x:
    print(i.count("AC"))
Problem p03101 (python)

Fixed submission:
H, W = map(int, input().split())
h, w = map(int, input().split())

print(str(H * W - (h * W + w * H - h * w)))

Buggy submission (verdict: Runtime Error):
import numpy as np

N, M, C = [int(x) for x in input().split()]
B = np.array([int(x) for x in input().split()])
A = np.empty((N,M))

count = 0
for n in range(N):
    A[n] = [int(m) for m in input().split()]
    count += (sum(A[n] * B)+C > 0)
print(count)
Problem p03106 (python)

Fixed submission:
A, B, K = map(int, input().split())
lista = [a for a in range(1, A + 1) if A % a == 0]
listb = [b for b in range(1, B + 1) if B % b == 0]
listc = sorted(list(set(lista) & set(listb)))
#print(lista)
#print(listb)
#print(listc)

print(listc[-K])

Buggy submission (verdict: Runtime Error):
A, B, K = map(int, input().split())
lista = [a for a in range(1, A + 1) if A % a == 0]
listb = [b for b in range(1, B + 1) if B % b == 0]
listc = list(set(lista) & set(listb))
#print(lista)
#print(listb)
#print(listc)

print(listc[K])
Problem p03071 (python)

Fixed submission:
A, B = map(int, input().split())
ans = 0
for i in range(2):
  if A > B:
    ans += A
    A -= 1
  else:
    ans += B
    B -= 1
else:
  print(ans)

Buggy submission (verdict: Runtime Error):
A, B = map(int, input().split())
ans = 0;
for i in range(2):
  if A > B:
    ans += A
    A -= 1
  else:
    ans += B:
    B -= 1
else:
  print(ans)
Problem p02909 (python)

Fixed submission:
S = input()
if S == "Sunny":
    print("Cloudy")
elif S == "Cloudy":
    print("Rainy")
else:
    print("Sunny")

Buggy submission (verdict: Runtime Error):
a = int(input())
print(a)
Problem p02983 (python)

Fixed submission:
L,R = map(int,input().split())
right = min(L+2019, R+1)
minimum = 2019

for i in range(L,right):
    for j in range(i+1,right):
         minimum = min(minimum,(i*j) % 2019)

print(minimum)

Buggy submission (verdict: Runtime Error):
L,R = map(int,input().split())
right = min(L+2019, R+1)
minumum = 2019

for i in range(L,right):
    for j in range(i+1,right):
         minimum = min(minimum,(i*j) % 2019)

print(minimum)
Problem p02995 (python)

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

def lcm(a, b):
    return a * b // gcd (a, b)

A,B,C,D = map(int,input().split())
count = 0

QC = 0 #Cで割り切れる
QD = 0 #Dで割り切れる
QCD = 0 #CとDで割り切れる

CD = lcm(C,D) #最大公約数

#約数の個数を求める
QC = (B // C) - (A // C)
if A % C == 0:
        QC += 1

QD = (B // D) - (A // D)
if A % D == 0:
        QD += 1

QCD = (B // CD) - (A // CD)
if A % CD == 0:
        QCD += 1

N = B-A+1
CorD = QC+QD-QCD

print(N-CorD)

Buggy submission (verdict: Runtime Error):
import math

A,B,C,D = map(int,input().split())
count = 0

QC = 0 #Cで割り切れる
QD = 0 #Dで割り切れる
QCD = 0 #CとDで割り切れる

CD = int(C * D / math.gcd(C, D)) #最大公約数
print(CD)

#約数の個数を求める
QC = (B // C) - (A // C)
if A % C == 0:
        QC += 1

QD = (B // D) - (A // D)
if A % D == 0:
        QD += 1

QCD = (B // CD) - (A // CD)
if A % CD == 0:
        QCD += 1

N = B-A+1
CorD = QC+QD-QCD

print(N-CorD)
Problem p03085 (python)

Fixed submission:
b = input()
# print(type(b))

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

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

if b == 'A':
    print("T")
elif b == 'C':
    print("G")
elif b == 'G':
    print("C")
else b == 'T':
    print("A")
Problem p03109 (python)

Fixed submission:
y,m,d = map(int,input().split("/"))

if y >= 2020:
    print("TBD")
elif y == 2019:
    if m >= 5:
        print("TBD")
    else:
        print("Heisei")   
else:
    print("Heisei")

Buggy submission (verdict: Runtime Error):
y,m,d = map(int,input().split("/"))

if y >= 2020:
    print("TBD")
elif y == 2019:
    if m >= 5:
    print("TBD")
else:
    print("Heisei")

Buggy submission (verdict: Runtime Error):
y,m,d = map(int,input().split("/")

if y >= 2020:
    print("TBD")
elif y == 2019:
    if m >= 5:
    print("TBD")
else:
    print("Heisei")
Problem p03125 (python)

Fixed submission:
A,B = map(int,input().split())
x = A + B if B % A == 0 else B - A
print(x)

Buggy submission (verdict: Runtime Error):
A,B = map(int,input().split)
x = A + B if A % B == 0 else B - A
print(x)
Problem p03260 (python)

Fixed submission:
A,B = map(int,input().split())
C = [1,2,3]

for i in C:
  if (A*B*i) % 2 == 1:
    print("Yes")
    exit()
print("No")

Buggy submission (verdict: Runtime Error):
A,B = map(int,input().split())
C = [1,2,3]

for i in C:
  if A*B*C % 2 == 1:
    print("Yes")
    exit()
print("No")
Problem p03294 (python)

Fixed submission:
import fractions

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

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

#aの最小公倍数を求める
lcm_t = a[0]

for j in range(1,N):
    lcm_t = lcm(lcm_t,a[j])

lcm_t = max(1,lcm_t-1)

ans = 0

for k in a:
    ans += lcm_t % k

print(ans)

Buggy submission (verdict: Runtime Error):
import math

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

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

#aの最小公倍数を求める
lcm_t = a[0]

for j in range(1,N):
    lcm_t = lcm(lcm_t,a[j])

lcm_t = max(1,lcm_t-1)

ans = 0

for k in a:
    ans += lcm_t % k

print(ans)
Problem p03316 (python)

Fixed submission:
N = int(input())
T = list(str(N))

Sn = 0

for i in T:
    Sn += int(i)

if N % Sn == 0:
    print("Yes")
else:
    print("No")

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

Sn = 0

for i in T:
    Sn += int(i)

if Sn % M == 0:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
N = list(input())
Sn = 0

for i in N:
    Sn += int(i)

if Sn % N == 0:
    print("Yes")
else:
    print("No")
Problem p03386 (python)

Fixed submission:
A,B,K = map(int,input().split())

if A+K-1 >= B-K+1:
    ans = list(range(A,B+1))
    for i in ans:
        print(i)
else:
    for i in list(range(A,A+K)):
        print(i)
    for i in list(range(B-K+1,B+1)):
        print(i)

Buggy submission (verdict: Runtime Error):
A,B,K = map(int,input().split())
ans = []

master = list(range(A,B+1))
sho = master.copy()
ko = master.copy()
L = len(master)

sho.sort()
ko.sort(reverse = True)

for i in range(min(K,L)):
    ans.append(sho[i])

for i in range(min(K,L)):
    ans.append(ko[i])

ans2 = set(ans)
ans3 = list(ans2)
ans3.sort()

print(ans3)
Problem p03399 (python)

Fixed submission:
A = int(input())
B = int(input())
C = int(input())
D = int(input())

print(min(A,B)+min(C,D))

Buggy submission (verdict: Runtime Error):
A,B,C,D = map(int,input().split())
print(min(A,B)+min(C,D))A = int(input())
B = int(input())
C = int(input())
D = int(input())

print(min(A,B)+min(C,D))

Buggy submission (verdict: Runtime Error):
A,B,C,D = map(int,input().split())
print(min(A,B)+min(C,D))
Problem p03416 (python)

Fixed submission:
A,B = map(int,input().split())
L = list(range(A,B+1))
counter = 0

for i in L:
    #回文判定
    tmp = list(str(i))
    if tmp[0] == tmp[4] and tmp[1] == tmp[3]:
        counter += 1

print(counter)

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

print(a[0]+b[1]+c[2])
Problem p03469 (python)

Fixed submission:
S = list(input())
S[3] = "8"
a = "".join(S)
print(a)

Buggy submission (verdict: Runtime Error):
S = list(input())
S[3] = 8
print("".join(S))
Problem p03502 (python)

Fixed submission:
S = input()

N = int(S)
H = list(S)

harshad = 0

for i in H:
    harshad += int(i)

if N % harshad == 0:
    print("Yes")
else:
    print("No")

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

N = int(input())
H = list(input())

harshad = 0

for i in H:
    harshad += int(i)

if N % harshad == 0:
    print("Yes")
else:
    print("No")
Problem p03547 (python)

Fixed submission:
X,Y = input().split()
X = int("0x"+X,0)
Y = int("0x"+Y,0)

if X<Y:
    print("<")
elif X>Y:
    print(">")
else:
    print("=")

Buggy submission (verdict: Runtime Error):
X,Y = map(int,input().split())
if X<Y:
    print("<")
elif X>Y:
    print(">")
else:
    print("=")
Problem p03609 (python)

Fixed submission:
X,T = map(int,input().split())
print(max(0,X-T))

Buggy submission (verdict: Runtime Error):
X,T = map(int,input().split())
print(max(0,X-t))
Problem p02576 (python)

Fixed submission:
N, X, T = map(int, input().split())
if int(N) % int(X) != 0 :
	print( ( int(N) // int(X) + 1) * int(T) )
if int(N) % int(X) == 0 :
	print( (int(N) // int(X) ) * int(T) )

Buggy submission (verdict: Runtime Error):
n = input( )
result = sum(list(map(int, str(n))))

if result % 9 == 0 :
    print('Yes')
else :
    print('No')

Buggy submission (verdict: Runtime Error):
N, X, T = int( input().split() )
if int(N) % int(X) != 0 :
	print( ( int(N) // int(X) + 1) * int(T) )
if int(N) % int(X) == 0 :
	print( (int(N) // int(X) ) * int(T) )

Buggy submission (verdict: Runtime Error):
N, X, T = map(int, input().split())
if int(N) % int(X) != 0 :
	print( ( int(N) // int(X) + 1) * int(T) )
if int(N) % int(X) == 0 :
	print( (int(N) / int(X) * int(T) )
Problem p02582 (python)

Fixed submission:
s = input()
if 'RRR' in s :
    print('3')
elif 'RR' in s :
    print('2')
elif 'R' in s :
    print('1')
else :
    print('0')

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

min_value=100

for i in a:
    x = 0
    while i % 2 == 0:
        i //= 2
        x += 1
    if min_value > x:
        min_value = x
print(min_value)
Problem p02601 (python)

Fixed submission:
(r1,g1,b1)=input().split()
(r,g,b)=(int(r1),int(g1),int(b1))
k=int(input())
flg=0
for i in range(k):
  if not g > r :
    g *= 2
  elif not b > g:
    b *= 2

if ( b > g > r):
  print ("Yes")
else:
  print ("No")

Buggy submission (verdict: Runtime Error):
(b1,g1,r1)=input().split()
(b,g,r)=(int(b1),int(g1),int(r1))
k=int(input())
flg=0
for i in range(K):
  if ( b> g > r):
    flg = 1
    break
  else:
    if not g > r :
      g *= 2
    elif not b > b:
      b *= 2

if flg == 1:
  print ("Yes")
else:
  print ("No")
Problem p02553 (python)

Fixed submission:
a, b, c, d = map(int, input().split())
ans = a * c
if a * d > ans:
    ans = a * d
if b * c > ans:
    ans = b * c
if b * d > ans:
    ans = b * d
print(ans)

Buggy submission (verdict: Runtime Error):
a,b,c,d = map(int, input().split())
i = 0
for x in range(a, b+1):
  for y in range(c, c+1):
    x * y = z
    if z >= i:
      i = z
print(i)
Problem p02582 (python)

Fixed submission:
s = input()
 
if 'RRR' in s:
  i = 3
elif 'RR' in s:
  i = 2
elif 'R' in s:
  i = 1
else:
  i = 0
print(i)

Buggy submission (verdict: Runtime Error):
S = list(input())

if 'RRR' in s:
  i = 3
elif 'RR' in s:
  i = 2
elif 'R' in s:
  i = 1
else:
  i = 0
print(i)

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

for i in range(1, 4):
  c = "R" * i
  if c in s:
    ans = i
    
print(ans)

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

for i in range(1, 4):
  c = "R" * i
  if c in s:
    ans = c
    
print(ans)

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

for i in range(1, 4):
  c = "R" * i
  if c in s:
    ans = c
    
print(ans)