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

Fixed submission:
n = int(input())
a = 0
for i in range(1, n + 1):
    if i % 5 != 0 and i % 3 != 0:
        a += i
print(a)

Buggy submission (verdict: Runtime Error):
N = input()
a = 0
for i in range(1, N + 1):
    if i % 5 != 0 and i % 3 != 0:
        a += i
print(a)
Problem p02725 (python)

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

distance = []
for i in range(1, N):
	distance.append(A[i] - A[i - 1])
distance.append((A[0] + K - (A[-1])))
most = max(distance)
output = K - most
print(output)

Buggy submission (verdict: Runtime Error):
K, N = map(int, input().split())
A = list(map(int, input().split())
distances = {}
for i in range(1, N):
	distances += (A[i] - A[i - 1]
most = max(distances.keys())
distances += (A[0] + K) - A[-1]                   
output = K - most
print(output)

Buggy submission (verdict: Runtime Error):
K, N = map(int, input().split())
A = list(map(int, input().split())
distances = {}
for i in range(1, len(A)):
	distances += (A[i] - A[i - 1]
most = max(distances.keys())
distance += (A[0] + K) - A[-1]                   
output = K - most
print(output)

Buggy submission (verdict: Runtime Error):
K, N = map(int, input().split())
A = list(map(int, input().split())
distances = {}
for i in range(1, len(A) + 1):
	distances += (A[i] - A[i - 1]
most = max(distances.keys())
output = K - most
print(output)

Buggy submission (verdict: Runtime Error):
K, N = map(int, input().split())
A = list(map(int, input().split())
distances = {}
for i in range(1, len(A) + 1):
	distances += (A[i] - A[i - 1]
most = max(distances.keys())
output = K - most
                  print(output)
Problem p02659 (python)

Fixed submission:
# -*- coding: utf-8 -*-
a, b = input().split()
print(int(a)*int(b.replace('.', ''))//100)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
a, b = input().split()
b_arr = b.split('.')
print(int(a)*(int(b_arr[0])+*int(b_arr[1])//100))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import math
a_n = map(int, input().split())
res = 1 * a for a in a_n
for a in a_n:
  res  *= a

res = -1 if math.log10(res) > 18 else res
print(res)
Problem p02661 (python)

Fixed submission:
n = int(input())
a = []
b = []
for i in range(n):
	a_1, b_1 = input().split()
	a.append(int(a_1))
	b.append(int(b_1))
a.sort()
b.sort()
is_odds = n % 2 == 0
a_med = a[(n + 1) // 2 - 1] if not is_odds else (a[n // 2 - 1] + a[n // 2]) / 2
b_med = b[(n + 1) // 2 - 1] if not is_odds else (b[n // 2 - 1] + b[n // 2]) / 2
from_a = a_med if not is_odds else int(a_med * 2)
to_b = b_med if not is_odds else int(b_med * 2)
print(to_b - from_a + 1)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = []
b = []
for i in range(n):
	a_1, b_1 = input().split()
	a.append(int(a_1))
	b.append(int(b_1))
a.sort()
b.sort()
is_odds = n % 2 == 0
a_med = a[(n + 1) // 2 - 1] if not is_odds else (a[n // 2 - 1] + a[n // 2]) / 2
b_med = b[(n + 1) // 2 - 1] if not is_odds else (b[n // 2 - 1] + b[n // 2]) / 2
from_a = a_med if not is_odds else int(a_med * 2)
to_b = b_med if not is_odds else int(b_med * 2)

print(len(list(range(from_a, to_b + 1))))
Problem p02835 (python)

Fixed submission:
A1,A2,A3=map(int,input().split())
if A1 + A2 + A3 > 21:
	print("bust")
else:
	print("win")

Buggy submission (verdict: Runtime Error):
import sys
 
args = sys.argv
 
sum = int(args[1])+int(args[2])+int(args[3])

if sum > 21:
	print('bust')
else:
	print('win')

Buggy submission (verdict: Runtime Error):
import sys

args = sys.argv

sum = int(args[0])+int(args[1])+int(args[2])

if sum > 21:
	print(bust)
else:
	print('win')
Problem p02819 (python)

Fixed submission:
import math

def Is(x):
  flag = False
  i = 2
  while i < math.sqrt(x):
    if x % i==0:
      flag = True
      break
    i += 1
  return flag

a = int(input())
ans = 0
flag2 = True
i = 0
while flag2:
  flag2 = Is( a + i )
  ans = a + i
  i += 1

print(ans)

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

if a+b<=n:
  a=0
  b=0
else:
  if n>a:
    b-=(n-a)
    a=0
    if b<0:
      b=0
  else:
    a=n-a

print("%d %d" %(a,b))
Problem p02880 (python)

Fixed submission:
a = int(input())
b = 0
if a<= 81:
  for i in range(9):
    for j in range(9):
      if (i+1)*(j+1)==a:
        b=1
        break
if b==0:
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
a = input()
b = 0
if a >= 82:
  print("No")
else:
  for i in range(9):
    for j in range(9):
      if (i+1)*(j+1)==a:
        print("Yes")
        b = 1
        break;
if b == 0:
  print("No")
Problem p02773 (python)

Fixed submission:
n = int(input())
m = {}
for i in range(n):
    s = input()
    if s in m:
        m[s] += 1
    else:
        m[s] = 1

l = sorted(m.items(), key=lambda x: x[1], reverse=True)
cnt = l[0][1]
p = []
for i in l:
    if i[1] == cnt:
        p.append(i[0])

p.sort()
for i in p:
  print(i)

Buggy submission (verdict: Runtime Error):
n = int(input())
m = {}
for i in range(n):
    s = input()
    m[s] += 1

l = sorted(m.items, key=lambda x: x[1], reverse=True)
cnt = l[0][1]
p = []
for i in l:
    if i[1] == cnt:
        p.append(i[0])

p.sort()
for i in p:
  print(i)
Problem p02659 (python)

Fixed submission:
def main():
    from decimal import Decimal
    a,b = map(Decimal,input().split())
    print(int(a*b))
    return
main()

Buggy submission (verdict: Runtime Error):
def main():
    from decimal import Decimal
    a,b = map(float,input().split())
    c = decimal(a)
    d = decimal(b)
    print(int(c*d))
    return
main()

Buggy submission (verdict: Runtime Error):
def main():
  	from decimal import Decimal
    a,b = map(decimal,input().split())
    print(int(a*b))
    return
main()

Buggy submission (verdict: Runtime Error):
    def main():
        a,b = map(float,input().split())
        x = a*b
        y = x%1
        z = int(x-y)
        if x-y-z > z+1-(x-y):
            print(z+1)
            return
        else:
            print(z)
            return
    main()

Buggy submission (verdict: Runtime Error):
def main():
    a,b = map(float,input().split()
    c = 100 * b
    x = a*c
    y = x%100
    z = int(x-y)
    p = z / 100
    print(int(p))
main()
Problem p02831 (python)

Fixed submission:
a,b=map(int,input().split())
import fractions
x=fractions.gcd(a,b)
print(a*b//x)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
import fractions
x=fractions.gcd(a,b)
print(a＊b/x)
Problem p03042 (python)

Fixed submission:
s=list(input())
s=list(map(int,s))
t=10*s[0]+s[1]
k=10*s[2]+s[3]
if 1<=t<=12:
  if 1<=k<=12:
    print("AMBIGUOUS")
  else:
    print("MMYY")
elif 1<=k<=12:
  print("YYMM")
else:
  print("NA")

Buggy submission (verdict: Runtime Error):
s=list(map(int,input().split))
t=10*s[0]+s[1]
k=10*s[2]+s[3]
if 1<=t<=12:
  if 1<=k<=12:
    print("AMBIGUOUS")
  elif:
    print("MMYY")
elif 1<=k<=12:
  print("YYMM")
else:
  print("NA")
Problem p03107 (python)

Fixed submission:
s=input()
a_1=s.count("1")
b_1=s.count("0")
if a_1<=b_1:
  print(2*a_1)
else:
  print(2*b_1)

Buggy submission (verdict: Runtime Error):
s=input()
a_1=s.count("1")
b_1=s.cpunt("0")
if a_1<=b_1:
  print(2*a_1)
else:
  print(2*b_1)
Problem p02773 (python)

Fixed submission:
n = int(input())
S = []
for i in range(n):
    s = input()
    S.append(s)
S.sort()
A = list(set(S))
A.sort()
#print(A)
#print(S)
NUM =[0]*len(A)
j = 0
for i in range(len(S)):
    if(i+1<len(S)):
        if (S[i] == S[int(i)+1]):
            NUM[j] = NUM[j]+ 1
        else:
            j += 1
import numpy as np
b = np.argmax(NUM)
#print(NUM,b)
for e,i in enumerate(NUM):
    #print(NUM[b])
    if (i == NUM[b]):
        print(A[e])

Buggy submission (verdict: Runtime Error):
n = int(input())
S = []
for i in range(n):
    s = input()
    S.append(s)
S.sort()
A = list(set(S))
A.sort()
#print(A)
#print(S)
NUM =[0]*len(A)
j = 0
for i in range(len(S)):
    if(i+1<len(S)):
        if (S[i] == S[int(i)+1]):
            NUM[j] = NUM[j]+ 1
        else:
            j += 1
import numpy as np
b = np.argmax(NUM)
#print(NUM,b)
for e,i in enumerate(NUM):
    #print(NUM[b])
    if (i == NUM[b]):
        print(A[e])

Buggy submission (verdict: Runtime Error):
n = int(input())
S = []
for i in range(n):
    s = input()
    S.append(s)
S.sort()
A = list(set(S))
A.sort()
#print(A)
#print(S)
NUM =[0]*len(A)
for j in range(len(A)):
    for i in range(len(S)):
        if (A[int(j)] == S[int(i)]):
            NUM[j] = NUM[j]+ 1
import numpy as np
b = np.argmax(NUM)
#print(NUM,b)
for e,i in enumerate(NUM):
    #print(NUM[b])
    if (i == NUM[b]):
        print(A[e])
Problem p02785 (python)

Fixed submission:
n,k = map(int,input().split())
H = list(map(int,input().split()))
H.sort(reverse = True)
H = H[k:]
print(sum(H))

Buggy submission (verdict: Runtime Error):
A = list(input().split(" "))
N = int(A[0])
K = int(A[1])
H = list(input().split(" "))
sum = 0
H.sort()
for i in range(K):
    H[N-1-i] = "0"
for i in range(N):
    sum += int(H[i])
print(sum)

Buggy submission (verdict: Runtime Error):
A = list(input().split(" "))
N = int(A[0])
K = int(A[1])
H = list(input().split(" "))
sum = 0
H.sort()
for i in range(K):
    H[N-1-i] = 0
for i in range(N):
    sum += int(H[i])
print(sum)
Problem p02847 (python)

Fixed submission:
youbi_list=["SUN","MON","TUE","WED","THU","FRI","SAT"]

s = input()

print(7-youbi_list.index(s))

Buggy submission (verdict: Runtime Error):
s = input()
n = int(input())
ans=[]
a = "ABCDEFGHIJKLMNOPQRSTUWVXYZABCDEFGHIJKLMNOPQRSTUWVXYZ"
a_list=[]
for j in a:
	a_list.append(j)
for i in range (len(s)):
	ans.append(a_list[(a_list.index(s[i]))+n])
print("".join(ans))
Problem p02897 (python)

Fixed submission:
import math
N = int(input())
a=N//2
b=N-a

print(b/N)

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
h = list(map(int,input().split()))
cnt=0
for i in range(n):
	if k<=h[i]:
		cnt+=1
print(cnt)

Buggy submission (verdict: Runtime Error):
n,k = map(int,input())
h = list(map(int,input().split()))
cnt=0
for i in range(n):
	if k<=h[i]:
		cnt+=1
print(cnt)

Buggy submission (verdict: Runtime Error):
N = int(input())
N_list = list(N)
a = 0
for i in range(N):
    if N_list[i]%2==0:
	       a += 1
ave = a/len(N_list)
print(ave)
Problem p02915 (python)

Fixed submission:

N = int(input())
ans = 0
for i in range(N):
	for j in range(N):
		for t in range(N):
			ans+=1
print(ans)#N^3が答え

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
A.append()
B.append()
ans=0
for i in range(1,N+1):
	ans+=B[A[i-1]-1]
	if A[i-1]==A[i]-1:
		ans+=C[A[i-2]]
print(ans)

Buggy submission (verdict: Runtime Error):
140 proA
N = int(input())
ans = 0
for i in range(N):
	for j in range(N):
		for t in range(N):
			ans+=1
print(ans)#N^3が答え
Problem p02916 (python)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
A.append(100)
B.append(100)
C.insert(0,0)
ans=0
for i in range(1,N+1):
	ans+=B[A[i-1]-1]
	if A[i-1]==A[i]-1:
		ans+=C[A[i-1]]
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
A.append(100)
B.append(100)
ans=0
for i in range(1,N+1):
	ans+=B[A[i-1]-1]
	if A[i-1]==A[i]-1:
		ans+=C[A[i-2]]
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
A.append()
B.append()
ans=0
for i in range(1,N+1):
	ans+=B[A[i-1]-1]
	if A[i-1]==A[i]-1:
		ans+=C[A[i-2]]
print(ans)

Buggy submission (verdict: Runtime Error):
C = list(map(int, input().split()))
A.append("")
B.append("")
ans=0
for i in range(1,N+1):
	ans+=B[A[i-1]-1]
	if A[i-1]==A[i]-1:
		ans+=C[A[i-2]]
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
ans=0
for i in range(N):
	ans+=B[A[i]]
	if A[i]==A[i-1]+1:
		ans+=C[A[i-1]]
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
for i in range(N):
	ans+=B[A[i]]
	if A[i]==A[i-1]+1:
		ans+=C[A[i-1]]
print(ans)
Problem p02951 (python)

Fixed submission:
a,b,c=map(int,input().split())
y1=a-b
y2=c-y1
if y2<0:
	print("0")
else:
	print(y2)

Buggy submission (verdict: Runtime Error):
n = int(input())
cnt=0
for i in range(1,n+1):
	if len(str(i))%2==1:
		cnt+=1
print(cnt)
Problem p02987 (python)

Fixed submission:
s = sorted(input())


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

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

s_l=s.sorted()
if s_l[0]!=s_l[1] or s_l[2]!=s_l[3] or s_l[0]==s[3]:
	print("No")
else :
	print("Yes")

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

s=s.sorted()
if s[0]!=s[1] or s[2]!=s[3] or s[0]==s[3]:
	Print("No")
elif :
	print("Yes")

Buggy submission (verdict: Runtime Error):
s = list(input().split())
ans="No"
if s[0]==s[1] and s[2]==s[3] or s[0]==s[2] and s[1]==s[3] or s[0]==s[3] and s[1]==s[2]:
	ans="Yes"
print(ans)

Buggy submission (verdict: Runtime Error):
s = list(input().split())
ans="No"
if s[0]==s[1] and s[2]==s[3] or s[0]==s[2] and s[1]==s[3] or s[0]==s[4] and s[1]==s[2]:
	ans="Yes"
print(ans)
Problem p03041 (python)

Fixed submission:
N,K = map(int, input().split())
S = input()
S_list =list(S)
l ={"A":"a","B":"b","C":"c"}
ans=S_list[K-1]
S_list[K-1]=l[ans]
print("".join(S_list))

Buggy submission (verdict: Runtime Error):
s=input()
s1=int(s[0]+s[1])
s2=int(s[2]+s[3])
if 1 <= s1 <= 12 and 1 <= s2 <= 12:
    print("AMBIGUOUS")
elif 1 <= s1 <= 12:
    print("MMYY")
elif 1 <= s2 <= 12:
    print("YYMM")
else:
    print("NA")
Problem p03072 (python)

Fixed submission:
n=int(input())
h=list(map(int,input().split()))
cnt=1
maxh=h[0]
for i in range(1,n):
	if maxh<=h[i]:
		maxh=h[i]
		cnt+=1
print(cnt)

Buggy submission (verdict: Runtime Error):
n=int(input())
h=list(map(int,input().split()))
cnt=1
for i in range(1,n+1):
	if h[i]>=h[0]:
		cnt+=1
print(cnt)
Problem p03075 (python)

Fixed submission:
a = ([int(input())for _ in range(5)])
k = int(input())
ans="Yay!"
for i in range(1,5):
	if k < a[i]-a[0]:
		ans=":("
print(ans)

Buggy submission (verdict: Runtime Error):
a = ([map(int, input())for _ in range[5]])
k = int(input())
ans="Yay!"
for i in range(1,4):
	if k < a[i]-a[0]:
		ans=":("
print(ans)
Problem p03135 (python)

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

Buggy submission (verdict: Runtime Error):
a,b,c = map(int, input().split())
print(a*b//2)
Problem p03803 (python)

Fixed submission:
a,b = map(int,input().split())
if a==1:
	a=14
if b==1:
	b=14
if a>b:
	print("Alice")
elif a<b:
	print("Bob")
else:
	print("Draw")

Buggy submission (verdict: Runtime Error):
a,b = int(input())
if a>b:
	print("Alice")
elif a<b:
	print("Bob")
else:
	print("Draw")
Problem p03242 (python)

Fixed submission:
n=input()
n=n.replace('1','2')
n=n.replace('9','1')
print(n.replace('2','9'))

Buggy submission (verdict: Runtime Error):
n=input()
n=n.replace('1','2')
n=n.replace('9','1')
print(n.replace('2','9')
Problem p02773 (python)

Fixed submission:
import collections
n = int(input())
s = [input() for _ in range(n)]
c = collections.Counter(s)
C = c.most_common()
most_count = C[0][1]
answer = []

for i in range(len(C)):
  if most_count == C[i][1]:
    answer.append(C[i][0])

answer.sort()
for i in answer:
    print(i)

Buggy submission (verdict: Runtime Error):
from collections import Counter

n = int(input())
s = [input() for i in range(n)]
news = sorted(s)
c = Counter(news)
max = c.most_common()[0][1]
print(c)
for i in range(n):
  if max == c.most_common()[i][1]:
    print(c.most_common()[i][0])
  else:
    break

Buggy submission (verdict: Runtime Error):
import collections as co

n = int(input())
s = [input() for i in range(n)]

c = co.Counter(s)
max = c.most_common()[0][1]
r = 1
i = 0

while r == 1:
  if max == c.most_common()[i][1]:
    print(c.most_common()[i][0])
  else:
    r = 0
  i += 1
Problem p02831 (python)

Fixed submission:
import fractions
a,b=map(int, input().split())
print(a*b//fractions.gcd(a,b))

Buggy submission (verdict: Runtime Error):
import math
a,b=map(int, input().split())
print(a*b//math.gcd(a,b))
Problem p02951 (python)

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

print(max(0,c-(a-b)))

Buggy submission (verdict: Runtime Error):
A, B = map(int, input().split())
 
if (A+B)%2 == 0:
    print( int((A+B)/2) )
else:
    print('IMPOSSIBLE')
Problem p02959 (python)

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = 0
cnt = 0
for i in range(n):
  c = min(a[i] + a[i+1],b[i])
  if b[i] > a[i]:
    a[i+1] = a[i] + a[i+1] - c
  cnt += c
print(cnt)

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

rest = 0
c = 0
for i in range(n):
    c += min(rest,a[i])
    c += min(max(0,a[i] - rest),b[i])
    rest = max(0, b[i] - a[i])
    
c += min(rest,a[i])
print(c)

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



c = [0]*n
for i in range(n):
    if  i > 0 and b[i - 1] > a[i] + a[i - 1]:
        c[i] = min(a[i] + a[i + 1] + a[i - 1] - c[i - 1], b[i])
    else:
        c[i] = min(a[i] + a[i + 1], b[i])

print(sum(c))

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



c = [0]*n
for i in range(n):
    if  i > 0 and b[i - 1] > a[i] + a[i - 1]:
        c[i] = min(a[i] + a[i + 1] + a[i - 1] - c[i - 1], b[i])
    else:
        c[i] = min(a[i] + a[i + 1], b[i])

print(c,sum(c))

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



c = [0]*(n)
for i in range(n):
    if i > 1 and a[i] < b[i]:
        c[i] = min(a[i] + a[i + 1], b[i])
    else:
        c[i] = min(a[i] + a[i + 1] - c[i - 1], b[i])
print(sum(c))
Problem p03775 (python)

Fixed submission:
n = int(input())
 
ans = int(1e5)
 
for a in range(1, int(n ** 0.5) + 1):
    if n % a == 0:
        b = len(str(n // a))
        ans = min(b, ans)
print(ans)

Buggy submission (verdict: Runtime Error):
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    # divisors.sort()
    return divisors

a = int(input())
ans = make_divisors(a)

print(len(str(max(ans[-1],ans[-2]))))
Problem p02987 (python)

Fixed submission:
def main():
    s = list(input())
    s_unq = list(set(s))

    if len(s_unq) == 2:
        if s.count(s_unq[0]) == 2 and s.count(s_unq[1]):
            print("Yes")
    else:
        print("No")

main()

Buggy submission (verdict: Runtime Error):
def main():
    s = list(input())
    s_uniq = list(set(s))

    a = s.count(s_uniq[0])
    b = s.count(s_uniq[1])

    if a == 2 and b == 2:
        print("Yes")
    else:
        print("No")

main()
Problem p02711 (python)

Fixed submission:
S = list(input())
if S.count('7'):
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
S = list(input())
if S.count(7)==0:
  print(No)
else:
  print(Yes)

Buggy submission (verdict: Runtime Error):
S = input()
if S.count(7)==0:
  print('No')
else:
  print('Yes')

Buggy submission (verdict: Runtime Error):
S = input()
if S.count(7)==0:
  print(No)
else:
  print(Yes)
Problem p03135 (python)

Fixed submission:
a,b = map(float,input().split())
print(a/b)

Buggy submission (verdict: Runtime Error):
a,b = map(double,input().split())
print(a/b)
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())
if s <= w:
    print("unsafe")
else:
    print("safe")
Problem p02785 (python)

Fixed submission:
n,k =map(int ,input().split())
h = list(map(int ,input().split()))
h.sort()
if n<k:
    print(0)
else:
    print(sum(h[0:n-k]))

Buggy submission (verdict: Runtime Error):
n,k =map(int ,input().split())
h = list(map(int ,input().split()))
h.sort(reverse =True)
if n<k:
    print(0)
else:
    for i in range(k):
        h.pop(i)
    print(sum(h))
Problem p02916 (python)

Fixed submission:
n = int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
c=list(map(int,input().split()))
ma=sum(b)
for i in range(0,n-1):
    if a[i+1]-a[i]==1:
        ma+=c[a[i]-1]
print(ma)

Buggy submission (verdict: Runtime Error):
n = int(input())
a,b,c = list(map(int, input().split()))
ma=sum(b)
for i in range(0,n-1):
    if a[i+1]-a[i]==1:
        ma+=c[a[i]-1]
print(ma)
Problem p03107 (python)

Fixed submission:
s =input()
zero =s.count("0")
one =s.count("1")
MIN =min(zero,one)
print(MIN*2)

Buggy submission (verdict: Runtime Error):
s =input()
zero =s.count("0")
one =s.count("1")
MIN =min(zero,one)
print(min*2)
Problem p02771 (python)

Fixed submission:
a = list(map(int, input().split()))
if (a[0]==a[1] and a[0] != a[2]) or (a[1]==a[2] and a[1] != a[0]) or (a[0]==a[2] and a[0] != a[1]):
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
a = list(map(int, input().split()))
if (a[0]==a[1] and a[0] != a[2]) or (a[1]==a[2] and a[1] != a[0]) or (a[0]==a[2] and a[0] != a[1]):
print('Yes')
else:
print('No')
Problem p02693 (python)

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

flug = 0

A = list(range(a, b+1))

for number in A:
    if number % k == 0:
        flug = 1
        
    else:
        continue

if flug == 1:
    print("OK")
else:
    print("NG")

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

if k*4 >= a:
    if k*4 <= b:
        print("OK")
    else:
        print("NG")

else:
    print("NG")
Problem p02711 (python)

Fixed submission:
N = input()

M = str(N)

L = list(map(int, M))

if L[0] == 7:
    print("Yes")
    
elif L[1] == 7:
    print("Yes")

elif L[2] == 7:
    print("Yes")

else:
    print("No")

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

M = str(N)
print(M)

L = list(map(int, M))
print(L)

if L[0] == 7:
    print("Yes")
    
elif L[1] == 7:
    print("Yes")

elif L[2] == 7:
    print("Yes")

else:
    print("No")

Buggy submission (verdict: Runtime Error):
def calc():
    for i in L:
        if L[i] == 7:
            print("Yes")
        else:
            return
    print("No")

N = int,input()

M = str(N)
print(M)

L = list(map(int, M))

calc()
Problem p02723 (python)

Fixed submission:
S = list(input())

if S[2] == S[3]:
  if S[4] == S[5]:
    print("Yes")
  else:
    print("No")
else:
  print("No")

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

if S[2] == S[3]:
  if S[4] == S[5]:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
S = list(str.imput())

if S[2] == S[3]:
  if S[4] == S[5]:
    print("Yes")
  else:
    print("No")
else:
  print("No")
Problem p02912 (python)

Fixed submission:
N, M = map(int, input().split())
A = [-1*int(i) for i in input().split()]

import heapq
# print(A)
heapq.heapify(A)
# print(A)
for _ in range(M):
    a = heapq.heappop(A)
#     print( "aaa",a)
    heapq.heappush(A,-1*((-1*a)//2))
#     print("AAA",A)
    
# print("list",A)

print(-1*sum(A))

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
A = [-1*int(i) for i in input().split()]

# import heapq
# print(A)
heapq.heapify(A)
# print(A)
for _ in range(M):
    a = heapq.heappop(A)
#     print( "aaa",a)
    heapq.heappush(A,-1*((-1*a)//2))
#     print("AAA",A)
    
# print("list",A)

print(-1*sum(A))
Problem p02915 (python)

Fixed submission:
n = int(input())

print(n**3)

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

print(n**3)

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
S = input()

dup = 0
for i in range(1,N):
    if S[i] == S[i-1]:
        dup += 1
#print(min(N-1, dup + K*2))
print(min(N-1,dup + K * 2))