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

Fixed submission:
import heapq as hp
n, m = (int(x) for x in input().split())
a = [int(x)*(-1) for x in input().split()]
hp.heapify(a)
for _ in range(m):
    min = hp.heappop(a)
    hp.heappush(a, (-1)*(-min//2))
print(-sum(a))

Buggy submission (verdict: Runtime Error):
n, m = (int(i) for i in input().split())
a = [int(i) for i in input().split()]
a.sort()
for _ in range(m):
    a[-1] //= 2
    if a[-1] >= a[-2]: continue
    else:
        a.sort()
print(sum(a))
Problem p03017 (python)

Fixed submission:
n, a, b, c, d = map(int, input().split())
s = input()
for i in range(a, max(c, d)):
    if s[i-1:i+1] == "##":
        print("No")
        exit()
if c < d:
    print("Yes")
    exit()
for i in range(b-1, d):
    if s[i-1:i+2] == "...":
        print("Yes")
        exit()
print("No")

Buggy submission (verdict: Runtime Error):
n, a, b, c, d = map(int, input().split())
s = [0 if i == "#" else 1 for i in input()]
cnt = 0
for si in range(a, max(c, d)):
    if si != 0:
        cnt = 0
    else:
        cnt += 1
        if cnt == 2:
            print("No")
            exit()
if c < d:
    print("Yes")
    exit()
idx = b - 1
cnt = 0
while idx < d:
    if s[idx] == s[idx+1] == s[idx+2] == 1:
        print("Yes")
        exit()
    else:
        idx += 1
print("No")

Buggy submission (verdict: Runtime Error):
n, a, b, c, d = map(int, input().split())
s = [0 if i == "#" else 1 for i in input()]
if c < d:
    print("Yes")
    exit()
idx = b - 1
cnt = 0
while idx <= d + 1:
    if s[idx] == 0:
        cnt = 0
    else:
        cnt += 1
        if cnt == 3:
            print("Yes")
            exit()
    idx += 1
print("No")
Problem p03038 (python)

Fixed submission:
n, m = map(int, input().split())
a = [int(i) for i in input().split()]
bc = []
for _ in range(m): bc.append([int(i) for i in input().split()])
a.sort()
bc.sort(key=lambda x:x[1])
bc = bc[::-1]
idx = 0
for b, c in bc:
    for bi in range(b):
        if idx + bi == n or a[idx+bi] >= c:
            idx = "e"
            break
        else: a[idx+bi] = c
    if idx == "e": break
    else: idx += b
print(sum(a))

Buggy submission (verdict: Runtime Error):
n, m = (int(i) for i in input().split())
a = [int(i) for i in input().split()]
a.sort()
bc = []
for _ in range(m):
    bc.append([int(i) for i in input().split()])
bc = sorted(bc, key=lambda x: x[1], reverse=True)
idx = 0
for i in range(m):
    v = bc[i][1]
    for j in range(idx, idx + bc[i][0]):
        if a[j] < v:
            a[j] = v
        else: break
        if j == idx + bc[i][0] - 1: idx += bc[i][0]
print(sum(a))

Buggy submission (verdict: Runtime Error):
n, m = (int(i) for i in input().split())
a = [int(i) for i in input().split()]
a.sort()
bc = []
for _ in range(m):
    bc.append([int(i) for i in input().split()])
bc = sorted(bc, key=lambda x: x[1], reverse=True)
idx = 0
for i in range(m):
    for j in range(idx, idx + bc[i][0]):
        if a[j] < bc[i][1]:
            a[j] = bc[i][1]
    idx += bc[i][0]
print(sum(a))
Problem p03137 (python)

Fixed submission:
n, m = (int(x) for x in input().split())
x = [int(x) for x in input().split()]
if n >= m:
    print(0)
else:
    x.sort()
    dis = [abs(x[i+1] - x[i]) for i in range(m-1)]
    dis.sort()
    ans = dis[::-1]
    for _ in range(n-1): ans.pop(0)
    print(sum(ans))

Buggy submission (verdict: Runtime Error):
n, m = (int(x) for x in input().split())
x = [int(x) for x in input().split()]
if m == 1: print(0)
else:
    x.sort()
    dis = [abs(x[i+1] - x[i]) for i in range(m-1)]
    dis.sort()
    ans = dis[::-1]
    for _ in range(n-1): ans.pop(0)
    print(sum(ans))

Buggy submission (verdict: Runtime Error):
n, m = (int(x) for x in input().split())
if m == 1: print(0)
else:
    x = [int(x) for x in input().split()]
    x.sort()
    dis = [abs(x[i+1] - x[i]) for i in range(m-1)]
    dis.sort()
    ans = dis[::-1]
    for _ in range(n-1): ans.pop(0)
    print(sum(ans))
Problem p03208 (python)

Fixed submission:
n, k = (int(x) for x in input().split())
h = []
for _ in range(n):
    h.append(int(input()))
h.sort()
ans = []
for i in range(n-k+1):
    ans.append(h[i+k-1]-h[i])
print(min(ans))

Buggy submission (verdict: Runtime Error):
n, k = (int(x) for x in input().split())
h = []
for _ in range(n):
    h.append(int(input()))
h.sort()
ans = []
for i in range(n-k-1):
    ans.append(h[i+k-1]-h[i])
print(min(ans))
Problem p03221 (python)

Fixed submission:
import bisect as bis
n, m = map(int, input().split())
idx = lambda x: x-1
p, y = [], []
for _ in range(m):
    p_, y_ = map(int, input().split())
    p.append(p_)
    y.append(y_)
val = [[] for _ in range(n)]
for i, j in zip(p, y):
    val[idx(i)].append(j)
for i in range(n):
    val[i].sort()
for i in range(m):
    v = p[i]
    id = bis.bisect_right(val[idx(v)], y[i])
    print(str(v).zfill(6) + str(id).zfill(6))

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
py = [[int(i) for i in input().split()] for _ in range(m)]
py_ = [[] for _ in range(m)]
for pi, yi in py:
    py_[pi-1].append(yi)
for i in range(m):
    py_[i].sort()
for pi, yi in py:
    print(str(pi).zfill(6) + str(py_[pi-1].index(yi) + 1).zfill(6))

Buggy submission (verdict: Runtime Error):
n, m = (int(x) for x in input().split())
d = [[] for _ in range(m)]
py = []
for i in range(m):
    py.append([int(x) for x in input().split()])
    d[py[i][0]-1].append(py[i][1])
for li in d:
    li.sort()
for li in py:
    print(str(li[0]).zfill(6) + str(d[li[0]-1].index(li[1])+1).zfill(6))
Problem p02594 (python)

Fixed submission:
X = int(input())
if X >= 30 :
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
X = int(input())
if X >= 30:
  print(Yes)
else:
  print(No)
Problem p02793 (python)

Fixed submission:
from fractions import gcd
def find(a):
    ans = a[0]
    for i in range(1,len(a)):
        ans = ((ans)//(gcd(ans,a[i])) * a[i])
    return ans            
	


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

lcm = find(a)
ans = 0
mod = pow(10,9)+7
for i in a:
	ans = ans + lcm//i
	
print(ans%mod)

Buggy submission (verdict: Runtime Error):
import math
def find(a):
    ans = a[0]
    for i in range(1,len(a)):
        ans = ((ans)//(math.gcd(ans,a[i])) * a[i])
    return ans            
	


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

lcm = find(a)
ans = 0
mod = pow(10,9)+7
for i in a:
	ans = ans + lcm//i
	
print(ans%mod)

Buggy submission (verdict: Runtime Error):
import math
def find(a):
    ans = a[0]
    for i in range(1,len(a)):
        ans = (ans*a[i])//(math.gcd(ans,a[i]))
    return ans



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

lcm = find(a)
ans = 0
mod = pow(10,9)+7
for i in a:
        ans = (ans + (lcm//i)%mod)%mod

print(ans)
Problem p02659 (python)

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

from decimal import Decimal

a, b = input().split()

print(int(Decimal(a)*Decimal(b)))

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

from decimal import Decimal

a, b = input().split()

print(int(decimal(a)*decimal(b)))
Problem p02859 (python)

Fixed submission:
R = int(input())
print(R*R)

Buggy submission (verdict: Runtime Error):
R = int(input())
return R*R
Problem p02847 (python)

Fixed submission:
S = input()

if S == "SUN":
    print("7")
elif S == "MON":
    print("6")
elif S == "TUE":
    print("5")
elif S == "WED":
    print("4")
elif S == "THU":
    print("3")
elif S == "FRI":
    print("2")
elif S == "SAT":
    print("1")

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

def func(N):
    return (A*N + B*len(str(N)))


def search(start, end):
    median = int((end - start)//2)
    if median == 0:
        if func(end) <= X:
            return end
        elif func(start) <= X:
            return start
        else:
            return 0

    val = func(start+median)
    if val == X:
        return (start+median)
    elif val > X:
        return search(start, start+median)
    elif val < X:
        return search(start+median, end)

result = search(1,10**9)
if result >= 1000000000:
    print(1000000000)
else:
    print(result)
Problem p02881 (python)

Fixed submission:
N = int(input())

for i in reversed(range(1, int(N**0.5)+1)):
    j = int(N/i)
    if i*j == N:
        print(i-1+j-1)
        break

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

for i in reversed(range(int(N**0.5))):
    j = int(N/i)
    if i*j == N:
        print(i-1+j-1)
        break
Problem p02933 (python)

Fixed submission:
a = int(input())
s = str(input())

if a >= 3200:
    print(s)
else:
    print('red')

Buggy submission (verdict: Runtime Error):
N, Q = map(int, input().split())
ki = [[[],0] for i in range(N)]
result = [0]*N

def dfs(i, num, parent):
    num_tmp = num+ki[i][1]
    result[i] = num_tmp
    if not ki[i][0]:
        return
    for j in ki[i][0]:
        if j == parent:
            continue
        dfs(j, num_tmp, i)
    return

for i in range(N-1):
    a, b = map(int, input().split())
    ki[a-1][0].append(b-1)
    ki[b-1][0].append(a-1)

for i in range(Q):
    p, x = map(int, input().split())
    ki[p-1][1] += x

dfs(0, 0, -1)
print(*result)

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

if a >= 3200:
    print(s)
else:
    print('red')
Problem p03013 (python)

Fixed submission:
import sys

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

dp = [-1]*(N+1)
dp[0] = 1
dp[1] = 1
for i in range(M):
    num = int(input())
    dp[num] = 0

for i in range(2, N+1):
    if dp[i] == 0:
        continue
    dp[i] = dp[i-1]%1000000007 + dp[i-2]%1000000007

print(dp[N]%1000000007)

Buggy submission (verdict: Runtime Error):
import sys

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

A = int(input())
n = 1

dp = [0]*(N+1)
if N == 1:
    if 1 == A:
        print('0')
        sys.exit()
    else:
        print('1')
        sys.exit()
if 1 == A:
    dp[1] = 0
    if M != n:
        A = int(input())
        n += 1
else:
    dp[1] = 1
dp[0] = 1
for i in range(2, N+1):
    if i == A:
        dp[i] = 0
        if M != n:
            A = int(input())
            n += 1
    else:
        dp[i] = dp[i-1]%1000000007 + dp[i-2]%1000000007

print(dp[N]%1000000007)
Problem p03221 (python)

Fixed submission:
N,M = map(int, input().split())
PY = [[0] * 2 for i in range(M)]

for i in range(M):
    p,y = map(int,input().split())
    PY[i][0] = p
    PY[i][1] = y

indices = list(range(M))
sorted_indices = sorted(indices, key=lambda i: PY[i])
PY.sort()

def calc(x):
    n = len(str(x))
    res = ""
    if n < 6:
        for i in range(6-n):
            res += "0"
    res += str(x)
    return res

before = 0
num = 1
ans = [0]*M
for i in range(M):
    if before != PY[i][0]:
        num = 1
        ans[sorted_indices[i]] = calc(PY[i][0])+calc(num)
        num += 1
        before = PY[i][0]
    else:
        ans[sorted_indices[i]] = calc(PY[i][0])+calc(num)
        num += 1
        before = PY[i][0]

for i in range(M):
    print(ans[i])

Buggy submission (verdict: Runtime Error):
N,M = map(int, input().split())
PY = [[0] * 2 for i in range(M)]

for i in range(M):
    p,y = map(int,input().split())
    PY[i][0] = p
    PY[i][1] = y

indices = [*range(len(PY))]
sorted_indices = sorted(indices, key=lambda i: PY[i])
PY.sort()

def calc(x):
    n = len(str(x))
    res = ""
    if n < 6:
        for i in range(6-n):
            res += "0"
    res += str(x)
    return res

before = 0
num = 1
ans = [0]*M
for i in range(M):
    if before != PY[i][0]:
        num = 1
        ans[sorted_indices[i]] = calc(PY[i][0])+calc(num)
        num += 1
        before = PY[i][0]
    else:
        ans[sorted_indices[i]] = calc(PY[i][0])+calc(num)
        num += 1
        before = PY[i][0]

for i in range(M):
    print(ans[i])

Buggy submission (verdict: Runtime Error):
N,M = map(int, input().split())
PY = [[0] * 2 for i in range(M)]

for i in range(M):
    p,y = map(int,input().split())
    PY[i][0] = p
    PY[i][1] = y

indices = [*range(len(PY))]
sorted_indices = sorted(indices, key=lambda i: PY[i])
PY.sort()

def calc(x):
    n = len(str(x))
    res = ""
    if n < 6:
        for i in range(6-n):
            res += "0"
    res += str(x)
    return res

before = 0
num = 1
ans = [0]*M
for i in range(M):
    if before != PY[i][0]:
        num = 1
        ans[sorted_indices[i]] = calc(PY[i][0])+calc(num)
        num += 1
        before = PY[i][0]
    else:
        ans[sorted_indices[i]] = calc(PY[i][0])+calc(num)
        num += 1
        before = PY[i][0]

for i in range(M):
    print(ans[i])
Problem p03127 (python)

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

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

ans=gcd(a[0],a[1])
if n>2:
  for i in range(2,n):
    ans=gcd(ans,a[i])
print(ans)

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

def gcd(*numbers):
    return reduce(math.gcd, numbers)
  
n=int(input())
a=list(map(int,input().split()))
ans=gcd(a[0],a[1])
if n>2:
  for i in range(2,n):
    ans=gcd(ans,a[i])
print(ans)
Problem p02595 (python)

Fixed submission:
n,d = map(int, input().split())
ans = 0
for i in range(n):
  x, y = map(int, input().split()) 
  if x*x + y*y <= d*d: # since they have given atmost distance d
    ans+= 1
print(ans)
'''
using distance formula check whether the the distance 
from origin is less than x sq and y sq
'''

Buggy submission (verdict: Runtime Error):
n, d = map(int,input().split())
cnt = 0
while(n--):
    p,q = map(int,input().split())
    if p**2 + q**2 <= d**2:
        cnt+=1
print(cnt)

Buggy submission (verdict: Runtime Error):
n, d = map(int,input().split())
cnt = 0
while(n>0):
    p,q = map(int,input().split())
    if d**2 <= (p**2)+(q**2):
        cnt+=1
print(cnt)

Buggy submission (verdict: Runtime Error):
n, d = map(int,input().split())
cnt = 0
while(n>0):
    p,q = map(int,input().split())
    if (p**2)+(q**2) <= d:
        cnt+=1
print(cnt)

Buggy submission (verdict: Runtime Error):
n, d = map(int,input().split())
cnt = 0
while(n>0):
    p,q = map(int,input().split())
    if d <= int((p**2)+(q**2)):
        cnt++
print(cnt)

Buggy submission (verdict: Runtime Error):
n, d = map(int(input()))
cnt = 0
while(n>0):
    p,q = map(int(input()))
    if d == int((p**2)+(q**2)):
        cnt++
print(cnt)
Problem p02699 (python)

Fixed submission:
s, w = map(int, input().split())
if s<=w:
  print("unsafe")
else:
  print("safe")

Buggy submission (verdict: Runtime Error):
s, w = int(input().split())
if s>=w:
  print("unsafe")
else:
  print("safe")
Problem p02711 (python)

Fixed submission:
n = list(input())
if "7" in n:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n = int(input())
if "7" in n:
  print("Yes")
else:
  print("No")
Problem p02712 (python)

Fixed submission:
import sys
import numpy as np

N=int(input())
A=np.arange(N+1)
count = 0

for i in range(N+1):
    if A[i]%3 != 0 and A[i]%5 != 0 and A[i]%15 != 0:
        count = count + A[i]
print(count)

Buggy submission (verdict: Runtime Error):
import sys
import numpy as np
n = int(input())
A = np.arrange(N+1)
count=0

for i in range(N+1):
  if A[i]%3 !=0 and A[i]%5 != 0 and A[i]%15 != 0:
	count = count + A[i]
print(count)
Problem p02723 (python)

Fixed submission:
s = input()
if s[2] == s[3] and s[4] == s[5]:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
s = input()
for i in s:
  if s[2] == s[3] and s[5] == s[6]:
    print("Yes")
  else:
    print("No")

Buggy submission (verdict: Runtime Error):
s = input()
for i in s:
  if s[i] == s[i+1]:
    print("Yes")
  else:
    print("No")

Buggy submission (verdict: Runtime Error):
s = input()
sr = set(s)
if s[i]==sr[i]:
  print("Yes")
else:
  print("No")
Problem p02771 (python)

Fixed submission:
arr = map(int, input().split())
if len(set(arr)) == 2:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
arr = map(int, input().split())
if len(set(a)) == 2:
    print("Yes")
else:
    print("No")
Problem p02785 (python)

Fixed submission:
N, K = map(int, input().split())
H = map(int,input().split())
print(sum(sorted(H, reverse=True)[K::]))

Buggy submission (verdict: Runtime Error):
[H, N] = [int(x) for x in input().split()]
A = list(map(int, input().split()))
arr = sorted(A, reverse=True)
while N > 0:
    arr.pop(0)
    N -= 1
    if N == 0:
        break
print(sum(arr))

Buggy submission (verdict: Runtime Error):
[H, N] = [int(x) for x in input().split()]
A = list(map(int, input().split()))
count = 0

arr = sorted(A, reverse=True)
while N > 0:
    arr.pop(0)
    N -= 1
    if N == 0:
        break
for x in arr:
    count += x

print(count)

Buggy submission (verdict: Runtime Error):
[H, N] = [int(x) for x in input().split()]
A = list(map(int, input().split()))
count = 0

arr = sorted(A, reverse=True)
while N > 0:
    arr.pop(0)
    N -= 1
for x in arr:
    count += x

print(count)
Problem p02711 (python)

Fixed submission:
N=input()
if "7" in N:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N=input()
if 7 in N:
  print("Yes")
else:
  print("No")
Problem p02897 (python)

Fixed submission:
n=int(input())
cnt=0
res=0.0
for i in range(1,n+1):
  if i%2==1:
    cnt+=1
    
res = cnt/n
print(res)

Buggy submission (verdict: Runtime Error):
n=int(input())
for i in range(1,n+1):
  cnt+=i%2
  
print(cnt/n)

Buggy submission (verdict: Runtime Error):
def euc(a,b):
  if a<b:
    a,b=b,a
  while(a%b!=0):
    a,b=b,a%b
    
  return b

one,two = [int(x) for x in input().split()]

aa = euc(one,two)

c=[]
for i in range(1,aa+1):
  if aa%i==0:
  	c.append(i)
    
c1=[(x) for x in c]

for i in c:
  for j in c1:
    if i>=j:
      continue
      
    if euc(i,j)!=1 and i!=1 and j!=1:
      if j in c:
        c.remove(j)
      
      
print(c)
Problem p02682 (python)

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

if S[0] + S[1] + S[2] > 2 * 10 ** 9:
    print('Error')
elif S[0] >= S[3]:
    print(S[3])
elif S[3] > S[0] and S[3] <= S[0] + S[1]:
    print(S[0])
elif S[3] > S[0] + S[1] and S[3] <= S[0] + S[1] + S[2]:
    print(-1 * (S[3] - S[0] - S[1]) + S[0])
else:
    print('Error')

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = int(input())
K = int(input())
if A + B + C >= 2 * 10 ** 9:
    print('Error')
elif A >= K:
    print(K)
elif K > A and K < A + B:
    print(A)
elif K > A + B and K <= A + B + C:
    print(-1 * (K - A - B) + A)
else:
    print('Error')
Problem p02688 (python)

Fixed submission:
[N, K] = list(map(int, input().split()))
all_A =[]
AB = []
for i in range(1, N + 1):
    all_A.append(i)
for j in range(K):
    d = int(input())
    A = list(map(int, input().split()))
    AB = AB + A
last_A = set(all_A) ^ set(AB)
print(len(last_A))

Buggy submission (verdict: Runtime Error):
[N, K] = list(map(int, input().split()))
all_A =[]
A_ = []
for i in range(1, N + 1):
    all_A.append(i)
for j in range(K):
    d = int(input())
    A = list(map(int, input().split()))
    A_ = A_.append(A)
all_A = set(all_A) ^ set(A_)
print(len(all_A))

Buggy submission (verdict: Runtime Error):
[N, K] = list(map(int, input().split()))
all_A =[]

for i in range(1, N + 1):
    all_A.append(i)
for j in range(K):
    d = int(input())
    A = list(map(int, input().split()))
    all_A = set(all_A) ^ set(A)
print(len(after_A))
Problem p02699 (python)

Fixed submission:
[S, W] = list(map(int, input().split()))
if W >= S:
    print('unsafe')
else:
    print('safe')

Buggy submission (verdict: Runtime Error):
[A, B, C, D] = list(map(int, input().split()))
X = A / D
Y = C / B
if (X - Y) > 1:
    print('Yes')
else:
    if Y > X:
        print('No')
    else:
        print('Yes')

Buggy submission (verdict: Runtime Error):
[A, B, C, D] = list(map(int, input().split()))
X = A / D
Y = C / B
if (X - Y) > 1:
    print('Yes')
else:
    if Y > X:
        print('No')
    else:
        print('Yes')

Buggy submission (verdict: Runtime Error):
[A, B, C, D] = list(map(int, input().split()))
X = A / D
Y = C / B
if (X - Y) > 1:
    print('Yes')
else:
    if Y > X:
        print('No')
    else:
        print('Yes')
Problem p02711 (python)

Fixed submission:
N = int(input())
h = N // 100
t = (N - h * 100) // 10
o = N - h * 100 - t * 10
if h == 7 or t == 7 or o == 7:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
N = int(input())
h = N // 100
t = (N - h) // 10
o = N - h - t
if h = 7 or t = 7 or o = 7:
    print('Yes')
else:
    print('No')
Problem p02712 (python)

Fixed submission:
N = int(input())
s = 0
for i in range (1, N + 1):
    if not (i % 3 == 0 or i % 5 == 0 or i % 15 == 0):
        s += i
print(s)

Buggy submission (verdict: Runtime Error):
N = input()
s = 0
for i in range (1, N + 1):
    if i % 3 == 0 and i % 5 == 0:
        break
    elif i % 3 == 0:
        break
    elif i % 5 == 0:
        break
    else:
        s += i
Problem p02859 (python)

Fixed submission:
print(pow(int(input()), 2))

Buggy submission (verdict: Runtime Error):
print(pow(int(input(), 2)))
Problem p03631 (python)

Fixed submission:
n = input()
print('Yes' if n[0] == n[-1] else 'No')

Buggy submission (verdict: Runtime Error):
n = int(input())
print('Yes' if n[0] == n[2] else 'No')

Buggy submission (verdict: Runtime Error):
n = int(input())
print('Yes' if n[::-1] == n else 'No')

Buggy submission (verdict: Runtime Error):
n = int(input())
print('Yes' if s[0] == s[-1] else 'No')
Problem p02595 (python)

Fixed submission:
n,d = map(int,input().split())
from math import sqrt
count = 0
for i in range(n):
    x,y = map(int,input().split())
    m = sqrt(x**2 + y**2)
    if m <= d:
        count += 1
print(count)

Buggy submission (verdict: Runtime Error):
n,d = map(int,input().split())
from math import sqrt
count = 0
for _ in range(n):
  x,y = map(int,input().split())
  m = sqrt(x**2 + y**2)
  if m <= d:
    count += 1
print(ccount)
Problem p02766 (python)

Fixed submission:
import math
n,k = map(int,input().split())
if n == 1:
  ans = 1
else:
  ans = math.ceil(math.log(n,k))
print(ans)

Buggy submission (verdict: Runtime Error):
import math
n,k = map(int,input().split())
ans = math.ceil(math.log(k,n))
print(ans)