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

Fixed submission:
X, A = map(int,input().split())
if X < A:
  print(0)
else:
  print(10)

Buggy submission (verdict: Runtime Error):
N,X=map(int,input().split())
L=list(map(int,input().split()))
count=1
tmp=0
for i in range(N):
  tmp+=L[i]
  if tmp<=X:
    count+=1
print(count)
Problem p03000 (python)

Fixed submission:
N,X=map(int,input().split())
L=list(map(int,input().split()))
count=1
tmp=0
for i in range(N):
  tmp+=L[i]
  if tmp<=X:
    count+=1
print(count)

Buggy submission (verdict: Runtime Error):
N, X = map(int, input().split())
L = list(map(int, input().split())
di = 0
for i in range(N):
  if di < X:
    di += L[i]
  else:
    print(i)
    break
Problem p03145 (python)

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

print(int(X[0]*X[1]/2))

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

print(X[0]*X[1]/2)
Problem p03501 (python)

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

Buggy submission (verdict: Runtime Error):
N, A, B = map(int(input().split()))
if A*N > B:
  print(B)
else:
  print(A*N)
Problem p02683 (python)

Fixed submission:
n, m, x = map(int, input().split())
ca = [list(map(int, input().split())) for _ in range(n)]

ans = []

for i in range(2 ** n):
    jud = [0]*m
    money = 0
    for j in range(n):
        if (i >> j) & 1:
            money += ca[j][0]
            for k in range(m):
                jud[k] += ca[j][k+1]
    if min(jud) >= x:
        ans.append(money)

if not ans:
    print(-1)
else:
    print(min(ans))

Buggy submission (verdict: Runtime Error):
n, m, x = map(int, input().split())
ca = [list(map(int, input().split())) for _ in range(n)]

ans = []

for i in range(2 ** n):
    jud = [0]*(m-1)
    money = 0
    for j in range(n):
        if (i >> j) & 1:
            money += ca[j][0]
            for k in range(m-1):
                jud[k] += ca[j][k]
    if min(jud) >= x:
        ans.append(money)

if not ans:
    print(-1)
else:
    print(min(ans))
Problem p02882 (python)

Fixed submission:
import math

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

if x >= (a ** 2) * b / 2:
    zy = (2 * x) / (a ** 2) - b
    if b != zy:
        q = b - zy
        print(90 - math.degrees(math.atan(a / q)))
    else:
        print(0)

else:
    p = (2 * x) / (a * b)
    print(90 - math.degrees(math.atan(p / b)))

Buggy submission (verdict: Runtime Error):
import math

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

if x >= (a ** 2) * b / 2:
    zy = (2 * x) / (a ** 2) - b
    q = b - zy
    print(90 - math.degrees(math.atan(a / q)))

else:
    p = (2 * x) / (a * b)
    print(90 - math.degrees(math.atan(p / b)))
Problem p02911 (python)

Fixed submission:
n, k, q = map(int, input().split())
p = k-q
l = [p]*n
for i in range(q):
    a = int(input())
    l[a-1] += 1
for k in range(n):
    print("Yes" if l[k]>0 else "No")

Buggy submission (verdict: Runtime Error):
import numpy as np
N, K, Q = map(int, input().split())
A = [int(input()) for _ in range(Q)]
score = np.array([int(K) for __ in range(N)])
score_1 = np.array([1 for _mi in range(N)])

for i in range(Q):
    score -= score_1
    score[A[i]-1] = score[A[i]-1]+1
for k in range(N):
    if score[k] <= 0:
        print("No")
    else:
        print("Yes")
Problem p02971 (python)

Fixed submission:
n = int(input())
a = [int(input()) for _ in range(n)]
max_a = max(a)
set_a = set(a)
max_n = a.count(max_a)
if len(set_a) == 1:
    s_set_a = max_a
else:
    if max_n > 1:
        s_set_a = max_a
    else:
        s_set_a = sorted(set_a)[-2]

for i in range(n):
    if max_a == a[i]:
        print(s_set_a)
    else:
        print(max_a)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = [int(input()) for _ in range(n)]
max_a = max(a)
set_a = set(a)
s_set_a = sorted(set(a))[-2]
for i in range(n):
    if max_a == a[i]:
        if len(set_a) == 1:
            print(max_a)
        else:
            print(s_set_a)
    else:
        print(max_a)
Problem p02983 (python)

Fixed submission:
l, r = map(int, input().split())
if r // 3 > (l - 1) // 3 and r // 673 > (l - 1) // 673:
    print(0)
else:
    print(min(i * j % 2019 for i in range(l, r + 1) for j in range(l, i)))

Buggy submission (verdict: Runtime Error):
L, R = map(int, input().split())
ij = [_ % 2019 for _ in range(L, R+1)]
ij_s = sorted(ij)
if ij_s in 3 and 673:
    print(0)
else:
    print((ij_s[0]*ij_s[1]))
Problem p02994 (python)

Fixed submission:
N,L = map(int,input().split())
azi = []
for i in range(N):
    azi.append(i+L)
if min(azi) > 0:
    k = min(azi)
elif min(azi) <= 0 and max(azi) >= 0:
    k = 0
elif max(azi) < 0:
    k = max(azi)
azi.remove(k)
print(sum(azi))

Buggy submission (verdict: Runtime Error):
N,L = map(int,input().split())
azi = []
for i in range(N):
    azi.append(i+L)
if min(azi) > 0:
    k = min(azi)
elif min(azi) < 0 and max(azi) > 0:
    k = 0
elif max(azi) < 0:
    k = max(azi)
azi.remove(k)
print(sum(azi))

Buggy submission (verdict: Runtime Error):
N,L = map(int,input().split())
azi = []
for i in range(N):
    azi.append(i+L)
if min(azi) > 0:
    k = min(azi)
elif min(azi) < 0 and max(azi) > 0:
    k = 0
elif max(azi) < 0:
    k = max(azi)
azi.remove(k)
print(sum(azi))
Problem p02995 (python)

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

lcm = (c * d) // fractions.gcd(c, d)

total = b - (b//c + b//d - b//lcm)
total_del = a-1 -((a-1)//c + (a-1)//d - (a-1)//lcm)

print(total - total_del)

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

lcm = (c * d) // math.gcd(c, d)

total = b - (b//c + b//d - b//lcm)
total_del = a-1 -((a-1)//c + (a-1)//d - (a-1)//lcm)

print(total - total_del)
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 = input("a:")
b = input("b:")
a = int(a)
b = int(b)

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

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

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

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

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

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

AB = a*b
if AB%2 == 0:
    print("Even")
else:
    print("Odd")
Problem p03524 (python)

Fixed submission:
s = list(str(input()))
count_0 = s.count("a")
count_1 = s.count("b")
count_2 = s.count("c")
max_c = max(count_0, count_1, count_2)
if abs(max_c - count_0) < 2 and abs(max_c - count_1) < 2 and abs(max_c - count_2) < 2:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
s = list(str(input()))
if len(s) == 1:
    print("YES")
    exit()
# 1文字と2文字と3文字で場合分けしてみる
jud = len(set(s))
jud_s = list(set(s))

count_0 = s.count(jud_s[0])
count_1 = s.count(jud_s[1])
count_2 = s.count(jud_s[2])

max_c = max(count_0, count_1, count_2)
if abs(max_c -count_0) < 2 and abs(max_c - count_1) <2 and abs(max_c -count_2) < 2:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
s = list(str(input()))
if len(s) == 1:
    print("YES")
    exit()


count_0 = s.count(jud_s[0])
count_1 = s.count(jud_s[1])
count_2 = s.count(jud_s[2])

max_c = max(count_0, count_1, count_2)
if abs(max_c -count_0) < 2 and abs(max_c - count_1) <2 and abs(max_c -count_2) < 2:
    print("YES")
else:
    print("NO")
Problem p03544 (python)

Fixed submission:
N = int(input())
memo = []
for i in range(N):
    if i == 0:
        memo.append(2)
    elif i == 1:
        memo.append(1)
    else:
        memo.append(memo[i-1] + memo[i-2])
if N == 1:
    print(1)
else:
    print(memo[N - 1] + memo[N - 2])

Buggy submission (verdict: Runtime Error):
for i in range(N):
    if i == 0:
        memo.append(2)
    elif i == 1:
        memo.append(1)
    else:
        memo.append(memo[i-1] + memo[i-2])

if N == 1:
    print(1)
else:
    print(memo[N - 1] + memo[N - 2])

Buggy submission (verdict: Runtime Error):
N = int(input())
memo = []
for i in range(N):
    if i == 0:
        memo.append(2)
    elif i == 1:
        memo.append(1)
    else:
        memo.append(memo[i-1] + memo[i-2])
if N == 0:
    print(memo[0])
elif N == 1:
    print(memo[1])
else: 
    print(memo[N-1] + memo[N - 2])
Problem p02613 (python)

Fixed submission:
n = int(input())
ac,wa,tle,re = 0,0,0,0
for i in range(n):
    inp = input()
    if inp == 'AC':
        ac += 1
    elif inp == 'WA':
        wa += 1
    elif inp == 'TLE':
        tle += 1
    else:
        re += 1



print('AC x {}\nWA x {}\nTLE x {}\nRE x {}'.format(ac,wa,tle,re))

Buggy submission (verdict: Runtime Error):
n = int(input())
ac,wa,tle,re = 0,0,0,0
for i in range(n):
    inp = input()
    if inp == 'AC':
        ac += 1
    elif inp == 'WA':
        wa += 1
    elif inp == 'TLE':
        tle += 1
    else :
        RE += 1



print('AC x {}\nWA x {}\nTLE x {}\nRE x {}'.format(ac,wa,tle,re))
Problem p03029 (python)

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


print((a*3 + p)//2)

Buggy submission (verdict: Runtime Error):
n,q = map(int, input().split())
STXlist = [list(map(int,input().split())) for _ in range(n)]
D = [(-1)*int(input()) for _ in range(q)]

time = 0
stop = 1
ans = [1j] * q
T = (sorted(STXlist, key=lambda x: x[1],reverse=True))  
Tmax = T[0][2]

while True:
    time += 1
    D = list(map(lambda x:x+1 , D))

    for STX in STXlist:
        if time >= STX[0] and time < STX[1]:
            if STX[2] in D:
                stop += 1
                ans[D.index(STX[2])] = D[D.index(STX[2])]
                D[D.index(STX[2])] = (1 + 1j)

    if stop == q:
        for i in ans:
            print(i)
        break
    
    if time > Tmax + 10:
        indexes = [i for i, x in enumerate(ans) if x == 1j]
        for i in indexes:
            ans[ans.index(1j)] = -1
        for i in ans:
            print(i)
        break
Problem p02641 (python)

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

if n:
    p = [int(i) for i in input().split(' ')]
    if x in p:
        for i in range(1, 101):
            if not x - i in p:
                print(x - i)
                exit()
            elif not x + i in p:
                print(x + i)
                exit()
    else:
        print(x)
else:
    print(x)

Buggy submission (verdict: Runtime Error):
x, n = [int(i) for i in input().split(' ')]
if n > 0:
    p = [int(i) for i in input().split(' ')]

    p.append(x)
    p.sort()
    i = p.index(x)

    y = x
    double = 0

    for j in range(1, i + 1):
        if i == j:
            low = x - j - 1
        elif not x - j + double == p[i - j]:
            if x == p[i - j]:
                double += 1
            else:
                low = x - j + double
                break
    double = 0
    for j in range(1, len(p) - i + 1):
        if j + i == len(p):
            high = x + j + 1
        elif not x + j - double == p[i + j]:
            if x == p[i + j]:
                double += 1
            else:
                high = x + j - double
                break

    if x - low > high - x:
        print(high)
    else:
        print(low)
else:
    print(x)
    exit()
Problem p02639 (python)

Fixed submission:
x = list(map(int,input().split()))
for i in range(5):
    if x[i] ==0:
        ans = i+1
    
print(ans)

Buggy submission (verdict: Runtime Error):
x = list(map(int,inpt().split()))
for i in range(5):
  if x[i] ==0:
    ans = i
    
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):
s = input()

if s == Sunny:
    print('Cloudy')
elif s == 'Cloudy':
    print('Rainy')
else:
    print('Sunny')
Problem p02918 (python)

Fixed submission:
n, k =map(int, input().split()) 
s = input()
count = 0
even =0
for i in range(n-1):
    if s[i] == s[i+1]:
        count += 1
    else:
        even +=1

for i in range(k):
        if even >= 2:
            count +=2
            even -= 2
        elif even ==1:
            count+=1
            even -=2
print(str(count))

Buggy submission (verdict: Runtime Error):
n, k =map(int, input().split()) 
s = input()
count = 0
for i in range(n-1):
    if s[i] == s[i+1]:
        count += 1
print(str(count+k*2)
Problem p02784 (python)

Fixed submission:
import sys
import itertools
read = sys.stdin.buffer.read #全てまとめて文字列として格納
readline = sys.stdin.buffer.readline # 一行読む
readlines = sys.stdin.buffer.readlines # 全行リストに格納

H,N = map(int, readline().split())
A = list(map(int, readline().split()))

if sum(A) >= H:
  print('Yes')
  exit()
else:
  print('No')
  exit()

Buggy submission (verdict: Runtime Error):
import sys
import itertools
read = sys.stdin.buffer.read #全てまとめて文字列として格納
readline = sys.stdin.buffer.readline # 一行読む
readlines = sys.stdin.buffer.readlines # 全行リストに格納

H,N = map(int, readline().split())
A = list(map(int, readline().split()))

if sum(A) >= H:
  print('Yes')
  exit()
print('No')
eixt()
Problem p02789 (python)

Fixed submission:
n,m = map(int, input().split())
if(n==m):
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
n=int(input())
p = list(map(int, input().split()))
count=1
newlist = []
for i in range(1, n):
  newlist.append(p[i-1])
  if p[i] <= min(newlist):
    count+=1
print(count)
Problem p02811 (python)

Fixed submission:
k,x = map(int, input().split())
if 500*k >= x:
  print('Yes')
  exit()
print('No')

Buggy submission (verdict: Runtime Error):
import itertools
n = int(input())
p = tuple(map(int, input().split()))
q = tuple(map(int, input().split()))
y = [num for num in range(1, n+1)]
permutation_n = list(itertools.permutations(y, 3))

a=b=0
count=1
for permu in permutation_n:
  if permu == p:
    a = count
  if permu == q:
    b = count
  if a != 0 and b != 0:
    break
  count+=1
print(abs(a-b))
Problem p03361 (python)

Fixed submission:
h, w = map(int, input().split())
s = [list(input()) for j in range(h)]
ans = 'Yes'
for j in range(h):
  for i in range(w):
    ok = False
    if s[j][i] == '#':
      if j-1>=0:
        if s[j-1][i] == '#': ok = True
      if i-1>=0:
        if s[j][i-1] == '#': ok = True
      if j+1<h:
        if s[j+1][i] == '#': ok = True
      if i+1<w:
        if s[j][i+1] == '#': ok = True
      if ok == False:
        print('No')
        exit()
print(ans)

Buggy submission (verdict: Runtime Error):
h, w = map(int, input().split())
s = [list(input()) for j in range(h)]
ans = 'Yes'
for j in range(w):
  for i in range(h):
    ok = False
    if s[j][i] == '#':
      if j-1>=0:
        if s[j-1][i] == '#': ok = True
      if i-1>=0:
        if s[j][i-1] == '#': ok = True
      if j+1<h:
        if s[j+1][i] == '#': ok = True
      if i+1<w:
        if s[j][i+1] == '#': ok = True
      if ok == False:
        print('No')
        exit()
print(ans)

Buggy submission (verdict: Runtime Error):
h, w = map(int, input().split())
s = [list(input()) for j in range(h)]
ans = 'Yes'
for j in range(w):
  for i in range(h):
    ok = False
    if s[j][i] == '#':
      if j-1>=0:
        if s[j-1][i] == '#': ok = True
      if i-1>=0:
        if s[j][i-1] == '#': ok = True
      if j+1<w:
        if s[j+1][i] == '#': ok = True
      if i+1<h:
        if s[j][i+1] == '#': ok = True
      if ok == False:
        print('No')
        exit()
print(ans)

Buggy submission (verdict: Runtime Error):
h, w = map(int, input().split())
s = [list(input()) for j in range(h)]
cross = [[0,-1],[-1,0],[1,0],[0,1]] # 上左右下の定義

for j in range(w):
  for i in range(h):
    if s[j][i] == '#' or s[j][i] == 'B':
      if i-1>=0 :
        if s[j][i-1] == '#': s[j][i-1] = 'B'
      if i+1<w :
        if s[j][i+1] == '#': s[j][i+1] = 'B'
      if j-1>=0 :
        if s[j-1][i] == '#': s[j-1][i] = 'B'
      if j+1<h :
        if s[j+1][i] == '#': s[j+1][i] = 'B'

for se in s:
  if '#' in se:
    print('No')
    exit()

print('Yes')

Buggy submission (verdict: Runtime Error):
h, w = map(int, input().split())
s = [list(input()) for j in range(h)]
cross = [[0,-1],[-1,0],[1,0],[0,1]] # 上左右下の定義

for j in range(w):
  for i in range(h):
    if s[j][i] == '#' or s[j][i] == 'B':
      if i-1>=0 :
        if s[j][i-1] == '#': s[j][i-1] = 'B'
      if i+1<w :
        if s[j][i+1] == '#': s[j][i+1] = 'B'
      if j-1>=0 :
        if s[j-1][i] == '#': s[j-1][i] = 'B'
      if j+1<h :
        if s[j+1][i] == '#': s[j+1][i] = 'B'

for se in s:
  if '#' in se:
    print('No')
    exit()

print('Yes')
Problem p03574 (python)

Fixed submission:
H,W = map(int, input().split())
S = [list(input()) for _ in range(H)] #データ形式はS[i][j]

eight = [[-1,-1],[0,-1],[1,-1], # 周囲8マスの定義
         [-1,0],[1,0],
         [-1,1],[0,1],[1,1]]

for i in range(H):
  for j in range(W):
    if S[i][j] == '#':
      for e in eight:
        if (0 <= i+e[0] < H) and (0 <= j+e[1] < W) :
          target = S[i+e[0]][j+e[1]]
          if target != '#' :
            if target == '.' :
              S[i+e[0]][j+e[1]] = 1
            else :
              S[i+e[0]][j+e[1]] += 1

for i in range(H):
  for j in range(W):
    print('0' if S[i][j] == '.' else str(S[i][j]), end='')
  if i < H: print('')

Buggy submission (verdict: Runtime Error):
H,W = map(int, input().split())
S = [list(input()) for _ in range(H)] #データ形式はS[i][j]

eight = [[-1,-1],[0,-1],[1,-1], # 周囲8マスの定義
         [-1,0],[1,0],
         [-1,1],[0,1],[1,1]]

for i in range(H):
  for j in range(W):
    if S[i][j] == '#':
      for e in eight:
        target = S[i+e[0]][j+e[1]]
        if target and target != '#':
          if target == '.' :
            S[i+e[0]][j+e[1]] = 1
          else :
            S[i+e[0]][j+e[1]] += 1

for i in range(H):
  for j in range(W):
    print(S[i][j], end='')
  if i < H: print('')

Buggy submission (verdict: Runtime Error):
H,W = map(int, input().split())
S = [list(input()) for _ in range(H)] #データ形式はS[i][j]

eight = [[-1,-1],[0,-1],[1,-1], # 周囲8マスの定義
         [-1,0],[1,0],
         [-1,1],[0,1],[1,1]]

for i in range(H):
  for j in range(W):
    if S[i][j] == '#':
      for e in eight:
        target = S[i+e[0]][j+e[1]]
        if target and target != '#':
          if target == '.' :
            S[i+e[0]][j+e[1]] = 1
          else :
            S[i+e[0]][j+e[1]] += 1

for i in range(H):
  for j in range(W):
    print(S[i][j], end='')
  print('')
Problem p03680 (python)

Fixed submission:
n = int(input())
a = [int(input()) for _ in range(n)]
pos=0
for i in range(n+1):
  if a[pos] == 2:
    print(i+1)
    exit()
  pos = a[pos]-1
print(-1)

Buggy submission (verdict: Runtime Error):
n=int(input())
a = [int(input()) for _ in range(n)]
position = a.index(2)
if position == False:
  print(str(-1))
  exit()
position = position + 1
for i in range(n+1): # 最高でもn+!回だけ探してやれば十分
  position = a.index(position) + 1
  if position==1:
    print(str(i+2))
    exit()
print(str(-1))

Buggy submission (verdict: Runtime Error):
n=int(input())
a = [int(input()) for _ in range(n)]
position = a.index(2)
if position == False:
  print(-1)
  exit()
position = position + 1
for i in range(n+1): # 最高でもn+!回だけ探してやれば十分
  position = a.index(position) + 1
  if position==1:
    print(i+2)
    exit()
print(-1)
exit()

Buggy submission (verdict: Runtime Error):
n=int(input())
a = [int(input()) for _ in range(n)]
position = a.index(2) + 1
if position == False:
  print(-1)
  exit()
for i in range(n+1): # 最高でもn+!回だけ探してやれば十分
  position = a.index(position) + 1
  if position==1:
    print(i+2)
    exit()
print(-1)
exit()
Problem p02639 (python)

Fixed submission:
import sys
lines = list(s.rstrip("\n") for s in sys.stdin)
numbers = list(map(int, lines[0].split(" ")))
for i, value in enumerate(numbers):
    if value == 0:
        print(i + 1)
        break

Buggy submission (verdict: Runtime Error):
import sys
line = sys.stdin.readlines()[0].rstrip("\n")
print(line.split(" ").index("0", 1))
Problem p03086 (python)

Fixed submission:
import sys
lines = [s.rstrip("\n") for s in sys.stdin.readlines()]
input = lines.pop(0)
acgt = tuple("ACGT")
max_num_list = []
max_num = 0
for c in input:
    if c in acgt:
        max_num += 1
    else:
        max_num_list.append(max_num)
        max_num = 0
max_num_list.append(max_num)
print(max(max_num_list))

Buggy submission (verdict: Runtime Error):
import sys
lines = [s.rstrip("\n") for s in sys.stdin.readlines()]
input = lines.pop(0)
acgt = tuple("ACGT")
max_num_list = []
max_num = 0
for c in input:
    if c in acgt:
        max_num += 1
    else:
        max_num_list.append(max_num)
        max_num = 0
print(max(max_num_list))
Problem p02717 (python)

Fixed submission:
from sys import stdin

a, b, c = [int(x) for x in stdin.readline().rstrip().split()]

print('{} {} {}'.format(c, a, b))

Buggy submission (verdict: Runtime Error):
from sys import stdin
import fractions

n, m = [int(x) for x in stdin.readline().rstrip().split()]
a_list = [int(x) for x in stdin.readline().rstrip().split()]

pick = [ x for x in a_list if x >= sum(a_list) * fractions.Fraction(1, 4 * m )]

print("Yes" if len(pick) > m else "No")

Buggy submission (verdict: Runtime Error):
from sys import stdin

a, b, c = [int(x) for x in stdin.readline().rstrip().split()]

print(f'{c} {a} {b}')
Problem p02690 (python)

Fixed submission:
import sys
input = sys.stdin.readline

def main():
    x = int(input())
    p = [0, 1]
    i = 2
    while p[-1] <= x*x:
        p.append(pow(i, 5))
        i += 1

    p_ = set(p)
    for z in p:
        if z - x in p_:
            print(int(pow(z, 1/5)), int(pow(z-x, 1/5)))
            return

        if x - z in p_:
            print(int(pow(abs(x-z), 1/5)), int(-pow(z, 1/5)))
            return


main()

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

def main():
    x = int(input())
    p = [0, 1]
    n = [0, -1]
    i = 2
    while p[-1] <= 2*x:
        p.append(pow(i, 5))
        n.append(-pow(i, 5))
        i += 1

    p_ = set(p)
    n_ = set(n)
    for z in p:
        if x - z in n_:
            print(int(pow(x - z, 1 / 5)), int(pow(z, 1 / 5)))
            return

        if x - z in p_:
            print(int(pow(x - z, 1 / 5)), int(-pow(z, 1 / 5)))
            return

main()
Problem p02802 (python)

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

scores = [[0, False] for _ in range(n+1)]

for _ in range(m):
    p, S = input().split()
    p = int(p)

    if scores[p][1]:
        continue

    if S == "AC":
        scores[p][1] = True
        continue

    if S == "WA":
        scores[p][0] += 1

score = pena = 0
for count, ac in scores:
    if ac:
        score += 1
        pena += count

print(score, pena)

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

scores = [[0, False] for _ in range(n)]

for _ in range(m):
    p, S = input().split()
    p = int(p)

    if scores[p][1]:
        continue

    if S == "AC":
        scores[p][1] = True
        continue

    if S == "WA":
        scores[p][0] += 1

score = pena = 0
for count, ac in scores:
    if ac:
        score += 1
        pena += count

print(score, pena)
Problem p02843 (python)

Fixed submission:
x = int(input())
for i in range(1,100000):
  if 100*i <= x <= 105*i:
    print(1)
    exit()
print(0)

Buggy submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(10**9)

x = input()
if len(x) < 3:
    print(0)

k = 0
if x[-3] == "0":
    k = 10
else:
    k = int(x[-3])

x = int(x[-2:])

products = [0, 1, 2, 3, 4, 5]

def dfs(comb_):
    if len(comb_) == k:
        return 1 if sum(comb_) == x else 0

    for product in products:
        comb = comb_[:]
        comb.append(product)
        if dfs(comb) == 1:
            return 1

    return 0

print(dfs([]))