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

Fixed submission:
# coding: utf8

if __name__ == "__main__":
    x = int(input())
    if x == 3 or x == 5 or x == 7:
        print("YES")
    else:
        print("NO")

Buggy submission (verdict: Runtime Error):
# coding: utf8

if __name__ == "__main__":
    x = int(input())
    if x == 3 or x == 5 or == 7:
        print("YES")
    else:
        print("NO")
Problem p03212 (python)

Fixed submission:
n = int(input())
cnt = 0

def rec(pref):
	global cnt
	if pref <= n:
		s = str(pref)
		if '3' in s and '5' in s and '7' in s:
			#print(pref)
			cnt += 1
		for d in {3, 5, 7}:
			rec(pref * 10 + d)


rec(0)
print(cnt)

Buggy submission (verdict: Runtime Error):
cnt = 0
n = int(input())
cnt = 0

def rec(int pref):
	if pref <= n:
		cnt += 1
		for d in {3, 5, 7}:
			rec(pref * 10 + d)


rec(0)
print(cnt - 1)
Problem p03415 (python)

Fixed submission:
import sys

i = 0
for l in sys.stdin:
    print(l[i], end='')
    i += 1

print('')

Buggy submission (verdict: Runtime Error):
import sys

i = 0
for l in sys.stdin():
  print(l[i], end='')
  i += 1
Problem p04044 (python)

Fixed submission:
N, L = map(int, input().split())
s = [0 for i in range(N)]
for i in range(N):
    s[i] = input()

s.sort()
output = ""
for i in range(N):
    output += s[i]
print(output)

Buggy submission (verdict: Runtime Error):
N, L = map(int, input().split())
s = [0 for i in range(N)]
for i in range(N):
    s[i] = input()

s.sort()
output = ""
for i in range(L):
    output += s[i]
print(output)
Problem p03455 (python)

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

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

Fixed submission:
x, a, b = map(int, input().split())
 
if abs(x-a) > abs(x-b):
  print("B")
else:
  print("A")

Buggy submission (verdict: Runtime Error):
x, a, b = map(int, input().split())
 
if abs(x-a) > abs(x-b):
  print(A)
else:
  print(B)

Buggy submission (verdict: Runtime Error):
x, a, b = input().split()
 
if abs(x-a) > abs(x-b):
  print(B)
else:
  print(A)

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

if abs(x-a) > abs(x-b):
  print(A)
else:
  print(B)
Problem p03693 (python)

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

if (100*a+10*b+c)%4==0:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
N = int(input())
A = input().split()
b = [0]*8
c = 0

for a in A:
    a = int(a)
    if 1<=a<=399:
        b[0] += 1
    elif 400<=a<=799:
        b[1] += 1
    elif 800<=a<=1199:
        b[2] += 1
    elif 1200<=a<=1599:
        b[3] += 1
    elif 1600<=a<=1999:
        b[4] += 1
    elif 2000<=a<=2399:
        b[5] += 1
    elif 2400<=a<=2799:
        b[6] += 1
    elif 2800<=a<=3199:
        b[7] += 1
    elif 3200<=a:
        c += 1

if c == 0:
    print(8-b.count(0), end=" ")
else:
    print(max(8-b.count(0),1), end=" ")

print(min(8-b.count(0)+c, 9))
Problem p03697 (python)

Fixed submission:
A, B = map(int, input().split())
 
if (A+B) >= 10:
    print("error")
else:
    print(A+B)

Buggy submission (verdict: Runtime Error):
A, B = input().split()

if (A+B) >= 10:
    print("error")
else:
    print(A+B)
Problem p03827 (python)

Fixed submission:
n = int(input())
s = input()
x = 0
l = [0]
for a in s:
    if a == "I":
        x = x + 1
        l.append(x)
    else:
        x = x - 1
        l.append(x)

print(max(l))

Buggy submission (verdict: Runtime Error):
 = int(input())
s = input()
x = 0
l = [0]
for a in s:
    if a == "I":
        x = x + 1
        l.append(x)
    else:
        x = x - 1
        l.append(x)

print(max(l))
Problem p03547 (python)

Fixed submission:

a, b = input().split()
if a == "A":
    a1 = 10
if a == "B":
    a1 = 11
if a == "C":
    a1 = 12
if a == "D":
    a1 = 13
if a == "E":
    a1 = 14
if a == "F":
    a1 = 15
if b == "A":
    b1 =10
if b == "B":
    b1 = 11
if b == "C":
    b1 = 12
if b == "D":
    b1 = 13
if b == "E":
    b1 = 14
if b == "F":
    b1 = 15
if a1 > b1:
    print(">")
elif a1 == b1:
    print("=")
else :
    print("<")

Buggy submission (verdict: Runtime Error):

a, b = input().split()
if a == "A":
    a1 = 10
if a == "B":
    a1 = 11
if a == "C":
    a1 = 12
if a == "D":
    a1 = 13
if a == "E":
    a1 = 14
if a == "F":
    a1 = 15
if b == "A":
    b1==10
if b == "B":
    b1 = 11
if b == "C":
    b1 = 12
if b == "D":
    b1 = 13
if b == "E":
    b1 = 14
if b == "F":
    b1 = 15
if a1 > b1:
    print(">")
elif a1 == b1:
    print("=")
else :
    print("<")

Buggy submission (verdict: Runtime Error):

a, b = input().split()
if a == "A":
    a1 = 10
if a == "B":
    a1 = 11
if a == "C":
    a1 = 12
if a == "D":
    a1 = 13
if a == "E":
    a1 = 14
if a == "F":
    a1 = 15
if b == "A":
    b== 10
if b == "B":
    b1 = 11
if b == "C":
    b1 = 12
if b == "D":
    b1 = 13
if b == "E":
    b1 = 14
if b == "F":
    b1 = 15
if a1 > b1:
    print(">")
elif a1 == b1:
    print("=")
else :
    print("<")
Problem p03328 (python)

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

num = b - a
h = 0
for i in range(num):
    h += i

print(h-a)

Buggy submission (verdict: Runtime Error):
package main

import (
    "fmt"
    "math/rand"
    "time"
)

func swap(data []float64, i,
Problem p03385 (python)

Fixed submission:
def abc(s):
    word = list(s)
    if word[0] != word[1] and word[0] != word[2] and word[1] != word[2]:
        print("Yes")
    else:
        print("No")

S = input()
abc(S)

Buggy submission (verdict: Runtime Error):
def abc(a,b,k):
    for i in range(k):
        print(a)
        a += 1
    for i in range(k):
        print(b-k+1)
        b += 1
a, b, k = map(int, input().split())

abc(a,b,k)
Problem p03680 (python)

Fixed submission:
n = int(input())
a = [None]
for j in range(n):
    a.append(int(input()))

i = 1
c = 0
r = [1]
while True:
    c += 1
    i = a[i]
    if i == 2:
        print(c)
        break
    if c > (10**5):
        print(-1)
        break

Buggy submission (verdict: Runtime Error):
n = int(input())
a = [int(input()) for i in range(n)]
check = []
cnt = 0
i = 0
while True:
    if i not in check:
        check.append(i)
        i = a[i]-1
    elif cnt >= len(n):
        print(-1)
        break
    if i == 1:
        print(len(check))
        break
    cnt += 1
Problem p03844 (python)

Fixed submission:
s = input().split()
print(int(s[0])+int(s[2])) if s[1] == "+" else print(int(s[0])-int(s[2]))

Buggy submission (verdict: Runtime Error):
#07:40
ans = 0
s = input().replace(" ","")
listS = [*s]
#fore = int(a)
#back = int(c)
if s[1] == '+':
    ans = int(s[0])+int(s[2])
elif s[1] == '-':
    ans = int(s[0])-int(s[2])
elif s[1] == '*':
    ans = int(s[0])*int(s[2])
elif s[1] == '/':
    ans = int(s[0])/int(s[2])
print(ans)
Problem p03214 (python)

Fixed submission:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys

input = raw_input()
N = int(input)
aVec = raw_input().split(" ")
a = []

for i in aVec:
    a.append(float(i))


#平均を算出
mean = sum(a) / N

#平均に最も近い値を算出(平均を引いたときの最小値を出す)
near_mean = []

for i in a:
    near_mean.append(abs(i - mean))

#平均値に最も近い値のフレーム番号(0始まり)を出力
#同じ値が複数ある場合は最初のインデックスを返す必要があるが、index関数はそういう仕様なので問題ない
print near_mean.index(min(near_mean))

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys

input = raw_input().split(" ")
N = int(input[0])
K = long(input[1])

aVec = raw_input().split(" ")
a = []

for i in aVec:
    a.append(long(i))


VecNum = N * (N + 1) / 2


subarray = []

for i in range(0, N):
    a_bubun = a[i:]
    for k in range(0, len(a_bubun)):
        subarray.append(a_bubun[k:])


#print subarray

beauty = []
for i in subarray:
    beauty.append(sum(i))
beauty.sort(reverse=True)


#K個大きい物を選ぶ
aK = []
for i in range(0, K):
    aK.append(beauty[i])


#論理積の最大値なので、最小値を求める
print min(aK)
Problem p03214 (python)

Fixed submission:
# -*- coding: utf-8 -*-
import statistics

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

def argmin(z):
    min_idx = 0
    min_val = 10000
    for k, v in enumerate(z):
        if min_val > v:
            min_idx = k
            min_val = v
    return min_idx, min_val

m = statistics.mean(a)
z = [abs(b - m) for b in a]

k, v = argmin(z)
print(k)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

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

dp = [[-1 for k in range(N*(N+1)//2+1)] for n in range(1000+1)]

def generate_substring(a):
    for i in range(N):
        for j in range(i, N):
            yield a[i:j+1]

def find_max_and(i, k):

    if dp[i][k] >= 0:
        return dp[i][k];
    
    if i == N_SUBSTR:
        res = 0xFFFF if k == 0 else 0
    elif k == 0:
        res = find_max_and(i + 1, k)
    else:
        a = find_max_and(i + 1, k)
        b = find_max_and(i + 1, k - 1) & scores[i]
        
        res = b if a == 0xFFFF else max(a, b)

    dp[i][k] = res
    return res

scores = list(map(sum, generate_substring(a)))
N_SUBSTR = len(scores)
print(find_max_and(0, K))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

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

dp = [[-1 for k in range(N*(N+1)//2+1)] for n in range(1000+1)]

def generate_substring(a):
    for i in range(N):
        for j in range(i, N):
            yield a[i:j+1]

def find_max_and(i, k):

    if dp[i][k] >= 0:
        return dp[i][k];
    
    if i == N_SUBSTR:
        res = 0xFFFF if k == 0 else 0
    elif k == 0:
        res = find_max_and(i + 1, k)
    else:
        a = find_max_and(i + 1, k)
        b = find_max_and(i + 1, k - 1) & scores[i]
        
        res = b if a == 0xFFFF else max(a, b)

    dp[i][k] = res
    return res

scores = list(map(sum, generate_substring(a)))
N_SUBSTR = len(scores)
print(find_max_and(0, K))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

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

dp = [[-1 for k in range(N*(N+1)//2+1)] for n in range(1000+1)]

def generate_substring(a):
    for i in range(N):
        for j in range(i, N):
            yield a[i:j+1]

def find_max_and(i, k):

    if dp[i][k] >= 0:
        return dp[i][k];
    
    if i == N_SUBSTR:
        res = 0xFFFF
    elif k == 0:
        res = find_max_and(i + 1, k)
    else:
        a = find_max_and(i + 1, k)
        b = find_max_and(i + 1, k - 1) & scores[i]
        
        res = b if a == 0xFFFF else max(a, b)

    dp[i][k] = res
    return res

scores = list(map(sum, generate_substring(a)))
N_SUBSTR = len(scores)
print(find_max_and(0, K))
Problem p03633 (python)

Fixed submission:
from functools import reduce

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

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

def lcmm(*args):
    return reduce(lcm, args)

N = int(input())
T = [0] * N
syuki = 0
for i in range(N):
    T[i] = int(input())
syuki = lcmm(*T)
print(syuki)

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

def gcd(*numbers):
    return reduce(math.gcd, numbers)

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

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

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

N = int(input())
T = [0] * N
syuki = 0
for i in range(N):
    T[i] = int(input())
syuki = lcm(*T)
if max(T) > syuki:
    print(max(T) + syuki)
else:
    print(syuki)

Buggy submission (verdict: Runtime Error):
import math

from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

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

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

N = int(input())
T = [0] * N
syuki = 0
for i in range(N):
    T[i] = int(input())
print(lcm(*T))
Problem p03695 (python)

Fixed submission:
N = input()
a = list(map(int,input().split()))
over3200 = 0
syurui_min = 0
syurui_max = 0
b = [0] * 8
for i in a:
    if 1 <= i and i <= 399:
        b[0] = 1
    if 400 <= i and i <= 799:
        b[1] = 1
    if 800 <= i and i <= 1199:
        b[2] = 1
    if 1200 <= i and i <= 1599:
        b[3] = 1
    if 1600 <= i and i <= 1999:
        b[4] = 1
    if 2000 <= i and i <= 2399:
        b[5] = 1
    if 2400 <= i and i <= 2799:
        b[6] = 1
    if 2800 <= i and i <= 3199:
        b[7] = 1
    if 3200 <= i and i <= 4800:
        over3200 += 1
for i in b:
    if(i == 1):
        syurui_min += 1
syurui_max = syurui_min + over3200
if syurui_min == 0:
    syurui_min = 1
print("{0} {1}".format(syurui_min, syurui_max))

Buggy submission (verdict: Runtime Error):
N = input()
a = list(map(int,input().split()))
over3200 = 0
syurui_min = 0
syurui_max = 0
b = [0] * 8
for i in a:
    if 3200 <= i and i <= 4800:
        over3200 += 1
    else:
        b[min(i // 400)] = 1
for i in b:
    if(i == 1):
        syurui_min += 1
syurui_max = syurui_min + over3200
if syurui_min == 0:
    syurui_min = 1
print("{0} {1}".format(syurui_min, syurui_max))
Problem p03679 (python)

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

z = a - b

if z >= 0:
    print("delicious")
elif z*(-1) <= x:
    print("safe")
else:
    print("dangerous")

Buggy submission (verdict: Runtime Error):
n = int(input())
a = [int(input()) for i in range(n)]

count = 0
nextbottun = 1

while(nextbottun != 2 and count <= 100000):
    nextbottun = a[nextbottun - 1]
    count += 1

if count <= 100000:
    print(count)
else:
    print(-1)
Problem p03693 (python)

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

suuji = a*100 + b*10 + c

if suuji%4 == 0:
    print("YES")

else:
    print("NO")

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(int(i) for i in input().split())

hai = 0
tya = 0
midori = 0
mizu = 0
ao = 0
ki = 0
daidai = 0
aka = 0

niji = 0

mincolor = 0
maxcolor = 0

for i in range(n):
    if 1 <= a[i] and a[i] <=399:
        hai = 1
    elif 400 <= a[i] and a[i] <= 799:
        tya = 1
    elif 800 <= a[i] and a[i] <= 1199:
        midori = 1
    elif 1200 <= a[i] and a[i] <=1599:
        mizu = 1
    elif 1600 <= a[i] and a[i] <= 1999:
        ao = 1
    elif 2000 <= a[i] and a[i] <= 2399:
        ki = 1
    elif 2400 <= a[i] and a[i] <=2799:
        daidai = 1
    elif 2800 <= a[i] and a[i] <= 3199:
        aka = 1
    elif 3200 <= a[i]:
        niji += 1

mincolor = hai + tya + midori + mizu + ao + ki + daidai + aka
maxcolor = mincolor + niji

if maxcolor >= 9:
    maxcolor = 8

print(mincolor, maxcolor)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(int(i) for i in input().split())

hai = 0
tya = 0
midori = 0
mizu = 0
ao = 0
ki = 0
daidai = 0
aka = 0

niji = 0

mincolor = 0
maxcolor = 0

for i in range(n):
    if 1 <= a[i] and a[i] <=399:
        hai = 1
    elif 400 <= a[i] and a[i] <= 799:
        tya = 1
    elif 800 <= a[i] and a[i] <= 1199:
        midori = 1
    elif 1200 <= a[i] and a[i] <=1599:
        mizu = 1
    elif 1600 <= a[i] and a[i] <= 1999:
        ao = 1
    elif 2000 <= a[i] and a[i] <= 2399:
        ki = 1
    elif 2400 <= a[i] and a[i] <=2799:
        daidai = 1
    elif 2800 <= a[i] and a[i] <= 3199:
        aka = 1
    elif 3200 <= a[i]:
        niji += 1

mincolor = hai + tya + midori + mizu + ao + ki + daidai + aka
maxcolor = mincolor

for i in range(niji):
    maxcolor += 1

if maxcolor >= 9:
    maxcolor = 8

print(mincolor, maxcolor)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(int(i) for i in input().split())

hai = 0
tya = 0
midori = 0
mizu = 0
ao = 0
ki = 0
daigai = 0
aka = 0

niji = 0

mincolor = 0
maxcolor = 0

for i in range(n):
    if 1 <= a[i] and a[i] <=399:
        hai = 1
    elif 400 <= a[i] and a[i] <= 799:
        tya = 1
    elif 800 <= a[i] and a[i] <= 1199:
        midori
    elif 1200 <= a[i] and a[i] <=1599:
        mizu = 1
    elif 1600 <= a[i] and a[i] <= 1999:
        ao = 1
    elif 2000 <= a[i] and a[i] <= 2399:
        ki = 1
    elif 2400 <= a[i] and a[i] <=2799:
        daidai = 1
    elif 2800 <= a[i] and a[i] <= 3199:
        aka = 1
    elif 3200 <= a[i]:
        niji += 1

mincolor = hai + tya + midori + mizu + ao + ki + daidai + aka
maxcolor = mincolor

for i in range(niji):
    maxcolor += 1

if maxcolor >= 9:
    maxcolor = 8

print(mincolor, maxcolor)
Problem p03695 (python)

Fixed submission:
n = int(input())
a = list(int(i) for i in input().split())

hai = 0
tya = 0
midori = 0
mizu = 0
ao = 0
ki = 0
daidai = 0
aka = 0

niji = 0

for i in range(n):
    if 1 <= a[i] and a[i] <=399:
        hai = 1
    elif 400 <= a[i] and a[i] <= 799:
        tya = 1
    elif 800 <= a[i] and a[i] <= 1199:
        midori = 1
    elif 1200 <= a[i] and a[i] <=1599:
        mizu = 1
    elif 1600 <= a[i] and a[i] <= 1999:
        ao = 1
    elif 2000 <= a[i] and a[i] <= 2399:
        ki = 1
    elif 2400 <= a[i] and a[i] <=2799:
        daidai = 1
    elif 2800 <= a[i] and a[i] <= 3199:
        aka = 1
    elif 3200 <= a[i]:
        niji += 1

mincolor = hai + tya + midori + mizu + ao + ki + daidai + aka

if mincolor == 0:
    mincolor += 1
    niji -= 1

maxcolor = mincolor + niji

#if maxcolor >= 9:
#    maxcolor = 8

print(mincolor, maxcolor)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(int(i) for i in input().split())

hai = 0
tya = 0
midori = 0
mizu = 0
ao = 0
ki = 0
daigai = 0
aka = 0

niji = 0

mincolor = 0
maxcolor = 0

for i in range(n):
    if 1 <= a[i] and a[i] <=399:
        hai = 1
    elif 400 <= a[i] and a[i] <= 799:
        tya = 1
    elif 800 <= a[i] and a[i] <= 1199:
        midori
    elif 1200 <= a[i] and a[i] <=1599:
        mizu = 1
    elif 1600 <= a[i] and a[i] <= 1999:
        ao = 1
    elif 2000 <= a[i] and a[i] <= 2399:
        ki = 1
    elif 2400 <= a[i] and a[i] <=2799:
        daidai = 1
    elif 2800 <= a[i] and a[i] <= 3199:
        aka = 1
    elif 3200 <= a[i]:
        niji += 1

mincolor = hai + tya + midori + mizu + ao + ki + daidai + aka
maxcolor = mincolor

for i in range(niji):
    maxcolor += 1

if maxcolor >= 9:
    maxcolor = 8

print(mincolor, maxcolor)
Problem p03251 (python)

Fixed submission:
l = input().split()


N = int(l[0])
M = int(l[1])
X = int(l[2])
Y = int(l[3])

"""
if X < -100:
    X = -100
elif X > 100:
    X = 100

if Y < -100:
    Y = -100
elif Y > 100:
    Y = 100
"""

lx = input().split()
ly = input().split()

lx = [int(z) for z in lx]
ly = [int(z) for z in ly]

lx = sorted(lx)


ly = sorted(ly)

flag = True


if int(ly[0]) - int(lx[N-1]) >= 1:
    for z in range(int(lx[N-1]) + 1, int(ly[0]) + 1):

        if z > X and z <= Y:
            flag = False
            break


if flag:
    print("War")
else:
    print("No War")

Buggy submission (verdict: Runtime Error):
l = input().split()


N = int(l[0])
M = int(l[1])
X = int(l[2])
Y = int(l[3])

"""
if X < -100:
    X = -100
elif X > 100:
    X = 100

if Y < -100:
    Y = -100
elif Y > 100:
    Y = 100
"""

lx = input().split()
ly = input().split()

lx = [int(z) for z in lx]
ly = [int(z) for z in ly]

lx = sorted(lx)


ly = sorted(ly)

flag = True



if int(ly[0]) - int(lx[N-1]) >= 1:
    for z in range(int(lx[N-1]) + 1, int(ly[0]) + 1):
        print(z)
        if z > X and z =< Y:
            flag = True
            break

else:
    flag = False

if flag:
    print("No war")
else:
    print("War")
Problem p03408 (python)

Fixed submission:
import collections
n_co = collections.Counter()
m_co = collections.Counter()

n = int(input())

for i in range(n):
	ni = input()
	n_co[ni] += 1

m = int(input())

for j in range(m):
	mi = input()
	m_co[mi] += 1

ans = (n_co - m_co)

if len(ans) == 0:
	print(0)
else:
	ans = ans.most_common(1)
	print(ans[0][1])

Buggy submission (verdict: Runtime Error):
import collections
n_co = collections.Counter()
m_co = collections.Counter()

n = int(input())

for i in range(n):
	ni = input()
	n_co[ni] += 1

m = int(input())

for j in range(m):
	mi = input()
	m_co[mi] += 1

ans = (n_co - m_co).most_common(1)

print(ans[0][1])
Problem p03609 (python)

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

if x - t < 0:
	print(0)
else:
	print(x - t)

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

if x - t <:
	print(0)
else:
	print(x - t)
Problem p03624 (python)

Fixed submission:
s = input()

set_s = set(s)

abc = 'abcdefghijklmnopqrstuvwxyz'

if len(abc) != 26:
	print('err')

set_abc = set(abc)

set_abc -= set_s

ans =[]

for c in set_abc:
	ans.append(c)
	
ans.sort()

if len(ans) == 0:
	print('None')
else:
	print(ans[0])

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

set_s = set(s)

abc = 'abcdefghijklmnopqrstuvwxyz'

if len(abc) != 26:
	print('err')

set_abc = set(abc)

set_abc -= set_s

ans =[]

for c in set_abc:
	ans.append(c)
	
ans.sort()

print(ans[0])
Problem p03853 (python)

Fixed submission:
h, w = list(map(int, input().split()))
line = [input() for i in range(h)]

for l in line:
    print(l)
    print(l)

Buggy submission (verdict: Runtime Error):
h, w = list(map(int, input().split()))
line = [input() for i in range(h)]

for l in line:
    print(l)
    print(l
Problem p03478 (python)

Fixed submission:
N,A,B = (int(x) for x in input().split())

sum = 0
for a in range(N+1):
  
  a = str(a)
  a_list = list(a)
  a_list_i = [int(a) for a in a_list]

  a_list_i_sum = 0
  for b in a_list_i:
    a_list_i_sum = a_list_i_sum + b
  if a_list_i_sum >=A and a_list_i_sum <= B:
    sum = sum + int(a)

print(sum)

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

sum = 0
for a in range(N+1):
  
  a = str(a)
  a_list = list(a)
  a_list_i = [int(a) for a in a_list]

  a_list_i_sum = 0
  for b in a_list_i:
    a_list_i_sum = a_list_i_sum + b
  if a_list_i_sum >=A and a_list_i_sum <= B:
    sum = sum + int(a)

print(sum)
Problem p03854 (python)

Fixed submission:
S = input()
N = ["dream", "dreamer", "erase", "eraser"]
bool = True

while bool:
  if len(S) == 0:
    break
 
  bool = False
  for n in N:
    
    if S.endswith(n):
      L = S.rsplit(n,1)
      S = L[0]
      bool = True
      break
  

if bool:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
S = input()
N = ["dream", "dreamer", "erase", "eraser"]
bool = True

while bool:
  if len(S) == 0:
    break
 
  bool = False
  for n in N:
    
    if S.endswith(n):
      L = S.rsplit(n,1)
      S = L[0]
      print(S)
      bool = True
      break
  

if bool:
  print("YES")
else:
  print("NO")
Problem p03220 (python)

Fixed submission:
n = int(input())
t, a = map(int, input().split())
list = [int(i) for i in input().split()]

dif_list = []
answer = 0

for i in range(n):
    t_i = t - list[i] * 0.006
    t_i_dif = abs(a - t_i)
    dif_list.append(t_i_dif)
    if min(dif_list) == t_i_dif:
        answer = i + 1

print(answer)

Buggy submission (verdict: Runtime Error):
n = int(input())
t, a = map(int, input().split())
list = [int(i) for i in input().split()]

dif_list = []
answer = 0

for i in range(n):
    t_i = t - list(i) * 0.006
    t_i_dif = abs(a - t_i)
    dif_list.append(t_i_dif)
    if min(dif_list) == t_i_dif:
        answer = i + 1

print(answer)