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

Fixed submission:
n, k = map(int, input().split())
dlist = input().split()
flg = True
while flg:
    s = str(n)
    for t in s:
        if t in dlist:
            n += 1
            break
    else:
        flg = False
print(n)

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

for i in range(n, 10000):
    flg: bool = True
    for s in str(i):
        if int(s) in dlist:
            flg = False
            break
    if flg:
        print(i)
        break
Problem p04043 (python)

Fixed submission:
A, B, C = map(int, input().split())
if [A, B, C].count(5) == 2 and [A, B, C].count(7) == 1:
	print("YES")
else:
  	print("NO")

Buggy submission (verdict: Runtime Error):
A, B, C = map(int, input().split())
if [A, B, C].count(5) = 2 and [A, B, C].count(7) = 1:
	print("YES")
else:
  	print("NO")
Problem p04043 (python)

Fixed submission:
def k(a,i1,i2):
  if(a==7):
    i1 = i1+1
  if(a==5):
    i2 = i2+1
  return i1,i2
  
a,b,c=map(int,input().split())
i1=0
i2=0
i1,i2 = k(a,i1,i2)
i1,i2 = k(b,i1,i2)
i1,i2 = k(c,i1,i2)
print('YES' if i1==1 and i2==2 else 'NO')

Buggy submission (verdict: Runtime Error):
def k(l,i1,i2):
  if(a==7):
    i1 = i1+1
  if(a==5):
    i2 = i2+1
return i1,i2
  
l=list(int,input().split())
i1=0
i2=0
for i in l:
  i1,i2 = k(i,i1,i2)
print('YES' if i1==1 and i2==2 else 'NO')
Problem p04043 (python)

Fixed submission:
import sys

args = list(map(int, input().split()))

if sorted(args) == [5, 5, 7]:
  print('YES')
else:
  print('NO')

Buggy submission (verdict: Runtime Error):
import sys

args = sys.args[1::]
numbers = [int(s) for s in args]

if sorted(numbers) == [5, 5, 7]:
  return 'YES'
else:
  return 'No'

Buggy submission (verdict: Runtime Error):
import sys

args = sys.args[1::]
ints = [int(s) for s in args]

return sorted(ints) == [5, 5, 7]
Problem p04043 (python)

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

cnt = 0
for i in A:
  if i != 7 and i !=5:
  	cnt = 5
  elif i == 7:
    cnt += 1

if cnt == 1:
  print('YES')
else:
  print('NO')

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

cnt = 0
for i in A:
  if i != 7 or i !=5:
  	print('NO')
  else i == 7:
    cnt += 1

if cnt == 1:
  print('YES')
else:
  print('NO')
Problem p04044 (python)

Fixed submission:
N, L = map(int, input().split())
A = map(str,list(input() for _ in range(N)))
B = sorted(A)

print(''.join(B))

Buggy submission (verdict: Runtime Error):
N, L = map(int, input().split())
A = map(int, list(input() for _ in range(N)))
B = sorted(A)

print(''.join(B))
Problem p04043 (python)

Fixed submission:
# -*- coding: utf-8 -*-
line = map(int, input().split())
#ans = "YES" if line.count(5) == 2 and line.count(7) == 1 else "NO"

if sorted(line) == [5, 5, 7]:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
line = map(int, input().split())

ans = "YES" if line.count(5) == 2 and line.count(7) == 1 else "NO"

print(ans)
Problem p04043 (python)

Fixed submission:
import fileinput

def main(arg_list):
    if(len(arg_list) == 3 and arg_list.count('5')==2 and arg_list.count('7') == 1):
        print("YES")
        return 
    print("NO")

if __name__ == "__main__":
    for line in fileinput.input():
        main(line.rstrip("\n\r").split(" "))

Buggy submission (verdict: Runtime Error):
import sys

def main(arg_list):
    if(len(arg_list == 3) and arg_list.count('5')==2 and arg_list.count('7') == 1):
        return "YES"
    return "NO"

if __name__ == "__main__":
    main(sys.argv)
Problem p04043 (python)

Fixed submission:
res = 'YES' if '557' == ''.join(sorted(input().split())) else 'NO'
print(res)

Buggy submission (verdict: Runtime Error):
if '557' == ''.join(sorted(input().split())):
    return 'YES'
else:
    return 'NO'
Problem p04043 (python)

Fixed submission:
a = list(map(int, input().split()))
#a = [5,7,5]
a.sort()
if a==[5,5,7]:
        print('YES')
else:
    print('NO')

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

for i in range(len(a)):
    if a[i] = 5:
        flag5 += 1
    elif a[i] = 7:
        flag7 += 1
    else:
        flag5 = 0
        break
if flag5=2 and flag7=1:
    print('YES')
else:
    print('NO')
Problem p04043 (python)

Fixed submission:
n = map(int, input().split(' '))
cnt1 = 0
cnt2 = 0
for t in n:
    if t == 5:
        cnt1 += 1
    if t == 7:
        cnt2 += 1

if cnt1 == 2 and cnt2 == 1:
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
n, _ = input().split(' ')
o = set([d for d in range(10)])
d = set([int(t) for t in input().split(' ')])
o = list(o.difference(d))
o.sort()
ans = []
for t in n:
    t = int(t)
    for tt in o:
        if tt >= t:
            ans.append(tt)
            break
    else:
        ans.append(o[0])

if int(''.join(map(str,ans))) < int(n):
    ans.insert(0, o[0] if o[0] != 0 else o[1])

print(''.join(map(str,ans)))
Problem p04043 (python)

Fixed submission:
#!/usr/bin/env python2
#encoding: UTF-8

# To change this license header, choose License Headers in Project Properties.
# To change this template file, choose Tools | Templates
# and open the template in the editor.
import math
line=raw_input().rstrip().split(' ')
a=int(line[0])
b=int(line[1])
c=int(line[2])
if((a==7 and b==5 and c==5)or(a==5 and b==7 and c==5)or(a==5 and b==5 and c==7)):
    print 'YES'
else:
    print 'NO'

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python2
#encoding: UTF-8

# To change this license header, choose License Headers in Project Properties.
# To change this template file, choose Tools | Templates
# and open the template in the editor.
import math
line=raw_input().rstrip().split(' ')
N=int(line[0])
L=int(line[1])
listo=[]
for i in range(L):
    listo.append(raw_input().rstrip())
listi=sorted(listo)
listni=''
for i in range(L):
    listni+=listi[i]
print listni
Problem p04047 (python)

Fixed submission:
k = int(input())
li= list(map(int, input().split()))
li.sort()
sum=0
for k in range(len(li)):
  
  if k%2==0:
   
    sum=sum+li[k]
 
print(sum)

Buggy submission (verdict: Runtime Error):
k = iinput()
li= input().split()
li.sort()
sum=0
for k in range(len(li)):
  
  if k%2==0:
   
    sum=sum+li[k]
 
print(sum)

Buggy submission (verdict: Runtime Error):
try:
  k=input()
except EOFError:
  print("wtf")

try:
  li=input()
except EOFError:
  print("wtf2")


li.sort()
sum=0
for k in range(len(li)):
  
  if k%2==0:
   
    sum=sum+li[k]
print(sum)

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

li=input()

li.sort()
sum=0
for k in range(len(li)):
  
  if k%2==0:
   
    sum=sum+li[k]
 
print(sum)
Problem p04047 (python)

Fixed submission:
n = int(input())
li = [int(x) for x in input().split()]

def skews(n,li):
    
    li = sorted(li)
    li = [l for i,l in enumerate(li) if i%2==0] 
    return sum(li)


print(skews(n,li))

Buggy submission (verdict: Runtime Error):

num = int(input())
li = int(input().split())

print(num)
print(li)
Problem p04048 (python)

Fixed submission:
N,X = input().split()
N,X = int(N), int(X)
answer = X+ (N-X)


def rhombus(N,X):
  	
    if X==1: 
        return N*2-1
    if X==0:
        return 0

    if N%X == 0:
        return X*(N//X)*2-X
      
    else: 
        k = N//X
        return k*2*X + rhombus(X,N-(k*X))

      

answer = answer + rhombus(N-X,X)
print(answer)

Buggy submission (verdict: Runtime Error):
N,X = input().split()
N,X = int(N), int(X)
answer = X+ (N-X)


def rhombus(N,X):
  	if N<X:
        temp = N
        N = X
        X = temp 
        
    if X==1: 
        return N+1
    if X==0:
        return 0

    if N%X == 0:
        return X*(N//X)*2-X
      
    else: 
        k = N//X
        return k*2*X + rhombus(X,N-(k*X))

      

answer = answer + rhombus(N-X,X)
print(answer)
Problem p04047 (python)

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

import numpy as np

def main(p1,p2):
    L_np = np.sort(np.array(p2))
    x_total = 0
    for i in range(p1):
        x_total += L_np[2*i]
    print(x_total)

if __name__ == "__main__":
    #a = [int(input()) for i in range(5)]
    N = int(input())
    L = [int(item) for item in input().split()]
    main(N,L)

Buggy submission (verdict: Runtime Error):
def main(p1,p2):
    print(p1)
    print(p2)
    L_np = np.sort(np.array(p2))
    x_total = 0
    for i in range(p1):
        x_total += L_np[2*i]
    print(x_total)

if __name__ == "__main__":
    #a = [int(input()) for i in range(5)]
    N = int(input())
    L = [int(item) for item in input().split()]
    main(N,L)
Problem p04047 (python)

Fixed submission:
a = int(input())
b = sorted(map(int,input().split()))
print(sum(b[0::2]))

Buggy submission (verdict: Runtime Error):
kusiyaki = int(input())
kushi = []

for i in range(kusiyaki*2):
  kushi.append(int(input()))
  
kushi = sorted(kushi)
print(sum(kushi[0::2]))

Buggy submission (verdict: Runtime Error):
kusiyaki = int(input('作りたい串焼きの本数を入力してください：'))
kushi = [None] * kusiyaki * 2
i = 0
sum = 0

for kushi_length in kushi:
  kushi_length = input('串の長さを入力してください：')
  kushi[i] = int(kushi_length)
  i += 1


kushi = sorted(kushi)
kushi_min_length = kushi[0:len(kushi):2]
print(kushi)
print(kushi_min_length)
for length in kushi_min_length:
  sum += int(length)

print(sum)
Problem p04047 (python)

Fixed submission:
x=input()
y = sorted(list(map(int, input().split())))
i=1
z=0
for i in range(int(len(y)/2)):
     z+=y[-2*i]
     i+=1

print(z)

Buggy submission (verdict: Runtime Error):
x,y=map(int,input().split())
z=3.5*y+x
print(z)

Buggy submission (verdict: Runtime Error):
x,y=map(int,input().split())
z=3.5*y+x
print(z)
Problem p04047 (python)

Fixed submission:
input_word = input()
N = int(input_word)
input_word = input()
tmp_list = input_word.split(" ")
input_list = [ int(i) for i in tmp_list ]
input_list.sort()
output = 0
for i in range(N):
  output += input_list[2*i]
print(output)

Buggy submission (verdict: Runtime Error):
input_word = input()
input_list = input_word.split(" ")
N = int(input_list[0])
K = int(input_list[1])
input_word = input()
tmp_list = input_word.split(" ")
input_list = [ int(i) for i in tmp_list ]

while True:
  flag = 0
  for i in range(1,N):
    number = input_list.index(i)
    number_1 = input_list.index(i+1)
    if number - number_1 >= K:
        input_list[number_1],input_list[number] = input_list[number],input_list[number_1]
        flag = 1
        break
  if flag == 0:
    break

for i in input_list:
  print(i)
Problem p04047 (python)

Fixed submission:
N = int(raw_input())
A = map(int, raw_input().split())
sum = 0
A.sort()
B = A[::2]
x = 0
for i in B:
    x = x + i
    pass
print x

Buggy submission (verdict: Runtime Error):
def gcd(a,b):
    if b == 0:
        return a
    return gcd(b,a%b)



N,k = map(int,raw_input().split())
#k = int(raw_input())
#A = map(int, raw_input().split())
ans = gcd(N,k)
print 3*(N - ans)

Buggy submission (verdict: Runtime Error):
N = int(raw_input())
A = map(int, raw_input().split())
sum = 0
A.sort()
A = A[::2]
print sum(A)
Problem p04048 (python)

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



N,k = map(int,raw_input().split())
#k = int(raw_input())
#A = map(int, raw_input().split())
ans = gcd(N,k)
print 3*(N - ans)

Buggy submission (verdict: Runtime Error):
def gcd(a,b):
    if b == 0:
        return a
    return gcd(b,a%b)



N = int(raw_input())
k = int(raw_input())
#A = map(int, raw_input().split())
ans = gcd(N,k)
print 3*(N - ans)
Problem p04047 (python)

Fixed submission:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
N = int(input())
Ls = list(map(int, input().split()))
sorted_ = sorted(Ls)
list_ = []
for i, x in enumerate(sorted_):
    if i % 2 == 0:
        list_.append(x)
sum_ = sum(list_)
print(sum_)

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
N, X = list(map(int, input().split()))
sum_ = X
prev = X
next = N - X
i = 0
while True:
    num = prev // next
    if i == 0:
        sum_ += 2 * num * next
    elif i % 2 == 1:
        sum_ += 2 * num * next - next
    else:
        sum_ += 2 * num * next - next
    mod_ = prev % next
    if mod_ == 0:
        break
    sum_ += next
    prev = next
    next = mod_
    i += 1
print(sum_)
Problem p04047 (python)

Fixed submission:
import numpy as np

N = int(raw_input())
data = np.array(map(int, raw_input().split()))
data = np.sort(data)
idx = np.array([True, False]*N)

ans = sum(data[idx])

print(ans)

Buggy submission (verdict: Runtime Error):
N, X = map(int, raw_input().split())
ans = 0
if N%2 ==0:
    d = min(X, N-X)
    ans = (N-d)*3
else:
    ans = (N-1)*3

print(ans)
Problem p04047 (python)

Fixed submission:
N = int(raw_input())
length_list = sorted(map(int, raw_input().strip().split()))

total = 0
for i in xrange(0, 2*N, 2):
    total += length_list[i]
print total

Buggy submission (verdict: Runtime Error):
N, X = map(int, raw_input().strip().split())
print N + (N-X)*2 -1
Problem p04047 (python)

Fixed submission:
def bbq():
    n = int(input())
    a = input()
    tmp = a.split()
    l = [int(x) for x in tmp]
    l.sort()
    n = 0
    i = 0
    while(i<len(l)):
        n += l[i]
        i += 2
    print (n)

if __name__ == "__main__":
    bbq()

Buggy submission (verdict: Runtime Error):
def bbq():
    n = int(input())
    a = input()
    tmp = a.split()
    l = [int(x) for x in tmp]
    l.sort()
    n = 0
    i = 0
    while(i<n:
        n += l[i]
        i += 2
    print (n)

if __name__ == "__main__":
    bbq()
Problem p04047 (python)

Fixed submission:
N=raw_input()
up=raw_input()
up=up.split()

up=map(int,up)
up.sort()
count=0
for i in range(int(N)):
    count+=up[i*2]
print count

Buggy submission (verdict: Runtime Error):
N=raw_input()
up=raw_input()
up=up.split()

up=map(int,up)
up.sort()
count=0
for i in range(N):
    count+=up[i*2]
print count

Buggy submission (verdict: Runtime Error):
N=raw_input()
up=raw_input().split()

up=map(int,up)
up.sort()
count=0
for i in range(N):
    count+=up[i*2]
print count

Buggy submission (verdict: Runtime Error):
N=raw_input()
up=raw_input().split()

up=up.sort()
count=0
for i in range(N):
    count+=int(up[i*2])
print count
Problem p02612 (python)

Fixed submission:
N = int(input())
if N%1000==0:
  print(0)
else:
  print(1000-(N%1000))

Buggy submission (verdict: Runtime Error):
N = int(input()
if N%1000==0:
  print(0)
else:
  print(1000-(N%1000))
Problem p02743 (python)

Fixed submission:
import math

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

if c-a-b>0 and 4*a*b < (c-a-b)*(c-a-b):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
mport math
 
a,b,c = map(int,input().split())
 
if c > a+b+2*math.sqrt(a*b):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
import math
 
a,b,c = map(int,input().split())
 
if c > a+b+2*math.sqrt(a*b)
  print("Yes")
else:
  print("No")
Problem p02770 (python)

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

#############
# Libraries #
#############

import math

#############
# Constants #
#############

MOD = 10**9 +7
INF = float('inf')

#############
# Functions #
#############

kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

#############
# Main Code #
#############

k,q = map(int, input().split())
d = list(map(int, input().split()))

def query(n,x,m):
  x %= m
  ans = n-1
  n -= 1
  s1 = 0
  t1 = 0
  for i in range(k):
    s1 += d[i] % m
    if d[i] % m == 0:
      t1 += 1
  s2 = 0
  t2 = 0
  for i in range(n%k):
    s2 += d[i] % m
    if d[i] % m == 0:
      t2 += 1
  x += s1 * (n//k) + s2
  ans -= x//m
  ans -= t1 * (n//k) + t2
  
  print(ans)
  
    

for _ in range(q):
  n,x,m = map(int, input().split())
  query(n,x,m)

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

def query(n,x,m):
  x %= m
  ans = n-1
  n -= 1
  s1 = 0
  t1 = 0
  for i in range(k):
    s1 += d[i] % m
    if d[i] % m == 0:
      t1 += 1
  s2 = 0
  t2 = 0
  for i in range(n%k):
    s2 += d[i] % m
    if d[i] % m == 0:
      t2 += 1
  x += s1 * (n//k) + s2
  ans -= x//m
  ans -= t1 * (n//k) + t2
  
  print(ans)
  
    

for _ in range(q):
  n,x,m = map(int, input().split())
  query(n,x,m)
Problem p02772 (python)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))  # 入力のときに N を使う必要はありません

flag = "APPROVED"
for n in A:
  if n % 2 == 0 and n%3 != 0 and n%5 != 0:
    flag = "DENIED"
    
print(flag)

Buggy submission (verdict: Runtime Error):
N = input()
l = input().split()
 
flag = "APPROVED"
for n in l:
  if n % 2 == 0 and n%3 != 0 and n%5 != 0:
    flag = "DENIED"
    
print(flag)

Buggy submission (verdict: Runtime Error):
l = input()
l = input().split()
l = l[1:]
 
flag = "APPROVED"
for n in l:
  if n % 2 == 0 and n%3 != 0 and n%5 != 0:
    flag = "DENIED"
    
print(flag)
Problem p02783 (python)

Fixed submission:
#L, R = map(int,input().split())
H,A = map(int,input().split())

r = H % A
if r == 0:
  ans = H/A
else:
  ans = (H-r)/A+1

print(int(ans))

Buggy submission (verdict: Runtime Error):
#L, R = map(int,input().split())
H,N = map(int,input().split())
A = list(map(int,input().split()))
 
a = 0
for i in A:
  a += i
  
if a>=H:
  print("Yes")
else:
  print("No")
Problem p02805 (python)

Fixed submission:
import math
import itertools

N = int(input())
l = [tuple(map(int,input().split())) for _ in range(N)]

if N == 2:
  x1,y1 = l[0]
  x2,y2 = l[1]
  print( 0.5 * math.hypot(x1-x2,y1-y2))
  
else:
  ans = float("INF")
  l_ = itertools.combinations(l,3)
  for points in l_:
    a,b = points[0]
    c,d = points[1]
    e,f = points[2]
    
    if (e-a)*(b-d) == (c-a)*(b-f):
      continue
    else:
      aa = a * a
      bb = b * b
      cc = c * c
      dd = d * d
      ee = e * e
      ff = f * f

      py = ((e - a) * (aa + bb - cc - dd) - (c - a) * (aa + bb - ee- ff)) / (2 * (e - a)*(b - d) - 2 * (c - a) * (b - f))

      px = (2 * (b - f) * py - aa - bb + ee + ff) / (2 * (e - a)) \
          if (c == a) else (2 * (b - d) * py - aa - bb + cc + dd) / (2 * (c - a))

      r = math.hypot(px - a, py - b) + 10**(-7)
    flag = 1
    for point in l:
      if flag:
        s,t = point
        if math.hypot(px - s, py - t) > r:
          flag = 0
    if flag:
      ans = min(r,ans)
      
  l_ = itertools.combinations(l,2)
  for points in l_:
    a,b = points[0]
    c,d = points[1]
    
    
    px,py = (a+c)/2,(b+d)/2

    r = math.hypot(px - a, py - b) + 10**(-7)
    flag = 1
    for point in l:
      if flag:
        s,t = point
        if math.hypot(px - s, py - t) > r:
          flag = 0
    if flag:
      ans = min(r,ans)
    
  print(ans)

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

N = int(input())
l = [tuple(map(int,input().split())) for _ in range(N)]

if N == 2:
  x1,y1 = l[0]
  x2,y2 = l[1]
  print( 0.5 * math.hypot(x1-x2,y1-y2))
  
else:
  ans = float("INF")
  l_ = itertools.combinations(l,3)
  for points in l_:
    a,b = points[0]
    c,d = points[1]
    e,f = points[2]
    
    if (e-a)*(b-d) == (c-a)*(b-f):
      r = 0.5 * max(math.hypot(c-a,b-d),math.hypot(e-a,b-f),math.hypot(c-e,f-d))
      
    else:
      aa = a * a
      bb = b * b
      cc = c * c
      dd = d * d
      ee = e * e
      ff = f * f

      py = ((e - a) * (aa + bb - cc - dd) - (c - a) * (aa + bb - ee- ff)) / (2 * (e - a)*(b - d) - 2 * (c - a) * (b - f))

      px = (2 * (b - f) * py - aa - bb + ee + ff) / (2 * (e - a)) \
          if (c == a) else (2 * (b - d) * py - aa - bb + cc + dd) / (2 * (c - a))

      r = math.hypot(px - a, py - b)
    flag = 1
    for point in l:
      if flag:
        s,t = point
        if math.hypot(px - s, py - t) > r:
          flag = 0
    if flag:
      ans = min(r,ans)
    
  print(ans)
Problem p02811 (python)

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

if K*500>=X:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
K,X = map(int,input())

if K*500>=X:
  print("Yes")
else:
  print("No")
Problem p02812 (python)

Fixed submission:
N = input()
s = list(input())

ans = 0
for i in range(len(s)-2):
  if s[i]=="A" and s[i+1] == "B" and s[i+2] ==  "C":
    ans += 1
    
print(ans)

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

ans = 0
for i in len(s-2):
  if s[i]=="A" and s[i+1] == "B" and s[i+2] ==  "C":
    ans += 1
    
print(ans)
Problem p03085 (python)

Fixed submission:
s = input()

if s=="A":
  print("T")
if s=="T":
  print("A")
if s=="C":
  print("G")
if s=="G":
  print("C")

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

if s=="A":
  print(T)
if s=="T":
  print(A)
if s=="C":
  print(G)
if s=="G":
  print(C)
Problem p03238 (python)

Fixed submission:
n = int(input())

if n==1:
  print("Hello World")
else:
  print(int(input())+int(input()))

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

if n==1:
  print("Hello World")
else:
  print(int(input())+int(input()))
Problem p03544 (python)

Fixed submission:
from functools import lru_cache

N = int(input())

@lru_cache(maxsize=None)
def luca(N):
  if N>=2:
    return luca(N-2)+luca(N-1)
  if N==1:
    return 1
  if N==0:
    return 2
  
print(luca(N))

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

def luca(N):
  if N>=2:
    return luca(N-2)+luca(N-1)
  if N==1:
    return 1
  if N==0:
    return 2
  
print(luca(N))
Problem p03605 (python)

Fixed submission:
s = input()

if s[0]=="9" or  s[1]=="9":
  print("Yes")
else:
  print("No")

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

if input[0]=="9" or  input[1]=="9":
  print("Yes")
else:
  print("No")

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

if input[0]=="9" or  input[1]=="9":
  print("Yes")
else:
  print("No")
Problem p03777 (python)

Fixed submission:
s = input()

if s == "D D" or s == "H H":
  print("H")
else:
  print("D")

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

if s = "D D" or "H H":
  print("H")
else:
  print("D")