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

Fixed submission:
cnt_st0 = 0
cnt_st1 = 0
in_str = str(input())
for i, m in enumerate(in_str):
  if i % 2 == 0:
    if str(m) == '0':
      cnt_st1 += 1
    else:
      cnt_st0 += 1
  else:
    if str(m) == '0':
      cnt_st0 += 1
    else:
      cnt_st1 += 1
print(min(cnt_st0, cnt_st1))

Buggy submission (verdict: Runtime Error):
cnt_st0 = 0
cnt_st1 = 0
in_str = str(input())
for i, m in enumerate(in_str):
  if i % 2 == 0:
    if m == '0':
      cnt_st1 += 1
    else:
      cnt_st0 += 1
  else:
    if m == '0':
      cnt_st0 += 1
    else:
      cnt_st1 += 1
      
print(min(cnt_st0, cnt_St1))
Problem p02676 (python)

Fixed submission:
k=int(input())
s=input()
if len(s)<=k:
    print(s)
else:
    print(s[:k]+"...")

Buggy submission (verdict: Runtime Error):
k=int(input())
s=input()
if s<=k:
    print(s)
else:
    print(s[:k]+"...")
Problem p02688 (python)

Fixed submission:
n,k=map(int,input().split())
ans=[1]*n
for _ in range(k):
    d=int(input())
    li=list(map(int,input().split()))
    for i in li:
        ans[i-1]=0
print(sum(ans))

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
ans=[1]*n
for _ in range(n):
    d=int(input())
    li=list(map(int,input().split()))
    for i in li:
        ans[i-1]==0
print(sum(ans))

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
ans=[]
for i in range(k):
    d=int(input())
    li=list(map(int,input().split()))
    for j in range(1,n+1):
        if (j not in li) and (j not in ans):
            ans=ans.append(j)
print(len(ans))
Problem p02729 (python)

Fixed submission:
N,M=map(int,input().split())
print(N*(N-1)//2+M*(M-1)//2)

Buggy submission (verdict: Runtime Error):
import math
N,M=map(int,input().split())
def combination(n,r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))
if N>=2 and M>=2:
    print(combination(N,2)+combination(M,2))
elif N>=2 and M<=2:
    print(combination(N,2))
else:
    print(combination(M,2))

Buggy submission (verdict: Runtime Error):
import math
N,M=map(int,input().split())
def combination(n,r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))
if N>=2 and M>=2:
    print(combination(N,2)+combination(M,2))
elif N>=2 and M<=2:
    print(combination(N,2))
else:
    print(combination(M,2))

Buggy submission (verdict: Runtime Error):
import math
N,M=int(input())
def combination(n,r):
    return math.factrial(n)//(math.factrial(n-r)*math.factrial(r))
if N>=2 and M>=2:
    print(combination(N,2)+combination(M,2))
elif N>=2 and M<=2:
    print(combination(N,2))
else:
    print(combination(M,2))

Buggy submission (verdict: Runtime Error):
import math
N,M=int(input())
def combination(n,r):
    return math.factrial(n)//math.factrial(n-r)*math.factrial(r)
if N>=2 and M>=2:
    print(combination(N,2)+combination(M,2))
elif N>=2 and M<=2:
    print(combination(N,2))
else:
    print(combination(M,2))

Buggy submission (verdict: Runtime Error):
import math
N,M=int(input())
def combination(n,r):
    return math.factrial(n)//math.factrial(n-r)*math.factrial(r)
print(combination(N,M))

Buggy submission (verdict: Runtime Error):
import math
N,M=input()
def combination(n,r):
    return math.factrial(n)//math.factrial(n-r)*math.factrial(r)
print(combination(N,M))
Problem p02835 (python)

Fixed submission:
a=list(map(int,input().split()))
if sum(a)>=22:
  print("bust")
elif sum(a)<=21:
  print("win")

Buggy submission (verdict: Runtime Error):
a=list(input().split())
if sum(a)>=22:
  print("bust")
elif sum(a)<=21:
  print("win")
Problem p02847 (python)

Fixed submission:
s=input()
a=["SUN","MON","TUE","WED","THU","FRI","SAT"]
print(7-a.index(s))

Buggy submission (verdict: Runtime Error):
s=input()
a=["SUN","MON","TUE","WED","THU","FRI","SAT"]
print(7-a.index(a))
Problem p02933 (python)

Fixed submission:
a=int(input())
s=input()
if a>=3200:
  print(s)
else:
  print("red")

Buggy submission (verdict: Runtime Error):
a=input()
s=input()
if a>=3200:
  print(s)
else:
  print("red")
Problem p02987 (python)

Fixed submission:
s=input()
if len(set(s))==2 and list(s).count(s[0])==2:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
s=list(input())
if len(set(s))==2 and list(s).count(s[0])==2:
  print("Yes")
else:
  print("No)

Buggy submission (verdict: Runtime Error):
s=input()
if len(set(s))==2 and list(s).count(s[0])==2:
  print("Yes")
else:
  print("No)

Buggy submission (verdict: Runtime Error):
s=input()
if len(set(s))==2 and s.count(s[0])==2:
  print("Yes")
else:
  print("No)
Problem p03041 (python)

Fixed submission:
n,k=map(int,input().split())
s=input()
print(s[:k-1]+s[k-1].lower()+s[k:])

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
s=input()
print(s[:k-1]+s[k-1].lower+s[k:])
Problem p03307 (python)

Fixed submission:
import math
N=int(input())
print(2*N//math.gcd(2,N))

Buggy submission (verdict: Runtime Error):
import math
N=int(input())
print(2*N//gcd(2,N))
Problem p03315 (python)

Fixed submission:
S=input()
print(S.count("+")-S.count("-"))

Buggy submission (verdict: Runtime Error):
S=input()
print(S.cout("+")-S.count("-"))
Problem p03834 (python)

Fixed submission:
s=input()
print(s.replace(","," "))

Buggy submission (verdict: Runtime Error):
s=input()
print(s.split(,))
Problem p02546 (python)

Fixed submission:
s=input()
if s[-1]!='s':print(s+'s')
else:print(s+'es')

Buggy submission (verdict: Runtime Error):
f=open('in','r')
input=lambda:f.readline().strip()

s=input()
if s[-1]!='s':print(s+'s')
else:print(s+'es')
Problem p02572 (python)

Fixed submission:
# f=open('in','r')
# input=lambda:f.readline().strip()

n=int(input())
r=list(map(int,input().split()))
mod=1000000007
s=sum(r)%mod
x=0
for u in r:
  x+=u**2
x%=mod
t=500000004
print((s**2-x)*t%mod)

Buggy submission (verdict: Runtime Error):
f=open('in','r')
input=lambda:f.readline().strip()

n=int(input())
r=list(map(int,input().split()))
mod=1000000007
s=sum(r)%mod
x=0
for u in r:
  x+=u**2
x%=mod
t=500000004
print((s**2-x)*t%mod)
Problem p02595 (python)

Fixed submission:
n,d=map(int,input().split())
s=0
for _ in range(n):
  x,y=map(int,input().split())
  if x**2+y**2<=d**2:s+=1
print(s)

Buggy submission (verdict: Runtime Error):
n,d=map(int,input().split())
def f(r):return r[0]**2+r[1]**2
print(sum(f(list(map(int,input().split())))<=d**2 for _ in range(n))

Buggy submission (verdict: Runtime Error):
n,d=map(int,input().split())
def f(r):return r[0]**2+r[1]**2
print(sum(f(list(map(int,input().split()))) for _ in range(n))
Problem p02659 (python)

Fixed submission:
m,k=input().split(" ")
m=int(m)
k=float(k)
k=int(k*100+0.5)
print(m*k//100)

Buggy submission (verdict: Runtime Error):
m,k=input().split(" ")
result=int(m)*float(k)
result=int(result)
print("%d"%result//100)
Problem p02659 (python)

Fixed submission:
def main():
    a, b = input().split()
    a = int(a)
    b0 = int(b[0])*100
    b1 = int(b[2])*10
    b2 = int(b[3])
    ans = (a*b0 + a*b1 + a*b2)//100
    print(ans)


if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
def main():
    a, b = list(input())
    a = int(a)
    b = float(b)
    ans = int(a*b)
    print(ans)


if __name__ == "__main__":
    main()
Problem p03803 (python)

Fixed submission:
def main():
    a, b = map(int, input().split())
    if a == b:
        ans = 'Draw'
    elif a == 1:
        ans = 'Alice'
    elif b == 1:
        ans = 'Bob'
    elif a > b:
        ans = 'Alice'
    elif a < b:
        ans = 'Bob'
    print(ans)


if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
def main():
    a, b = map(int, input().split())
    if a == b:
        ans = 'Draw'
    elif a == 1:
        ans = 'Alice'
    elif b == 1:
        ans = 'Bob'
    elif a > b:
        ans = 'Alice'
    elif b < a:
        ans = 'Bob'
    print(ans)


if __name__ == "__main__":
    main()
Problem p02598 (python)

Fixed submission:
import sys
input = lambda: sys.stdin.readline().rstrip('\r\n')

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

lo = 1
hi = max(A) + 1

def ceildiv(a, b):
	return (a + b - 1) // b

while lo < hi:
	tar = (lo + hi) // 2

	cuts = 0
	for v in A:
		x = ceildiv(v, tar)
		cuts += x - 1
		if cuts > K:
			lo = tar + 1
			break
	else:
		hi = tar

print(lo)

Buggy submission (verdict: Runtime Error):
import sys
input = lambda: sys.stdin.readline().rstrip('\r\n')

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

lo = 0
hi = max(A) + 1

def ceildiv(a, b):
	return (a + b - 1) // b

while lo < hi:
	tar = (lo + hi) // 2

	cuts = 0
	for v in A:
		x = ceildiv(v, tar)
		cuts += x - 1
		if cuts > K:
			lo = tar + 1
			break
	else:
		hi = tar

print(lo)
Problem p02577 (python)

Fixed submission:
N=str(input())
NN=0
for i in range(len(N)):
    NN=NN+int(N[i])
  
if NN%9==0:print('Yes')
else:print('No')

Buggy submission (verdict: Runtime Error):
from sys import stdin
input = stdin.readline
N=str(input())
NN=0
for i in range(len(N)):
    NN=NN+int(N[i])
  
if NN%9==0:print('Yes')
else:print('No')
Problem p02623 (python)

Fixed submission:
import numpy as np
import bisect
N,M,K= map(int, input().split())
A=list(map(int, input().split()))
B=list(map(int, input().split()))
if A[0]>K and B[0]>K:print(0);exit()

Asum=[0]
for i in range(N):
  if Asum[-1]+A[i]<=K:
    Asum.append(Asum[-1]+A[i])  
  else:break
    
Bsum=[0]
for j in range(M):
  if Bsum[-1]+B[j]<=K:
    Bsum.append(Bsum[-1]+B[j])
  else:break
    #AAsum=[]
#for i in range(len(Asum)):
#  AAsum.append(K-Asum[i])

#print(Asum)
#print(AAsum)
#print(Bsum)

C=[]
for i in range(len(Asum)):
  C.append(bisect.bisect(Bsum,K-Asum[i])+i-1)

#print(Asum)
#print(AAsum)
#print(Bsum)
#print(C)
print(max(C))
#176882

Buggy submission (verdict: Runtime Error):
import numpy as np
import bisect
N,M,K= map(int, input().split())
A=list(map(int, input().split()))
B=list(map(int, input().split()))
if A[0]>K and B[0]>K:print(0);exit()

Asum=[0]
for i in range(N):
  if Asum[-1]+A[i]<=K:
    Asum.append(Asum[-1]+A[i])  

Bsum=[0]
for j in range(M):
  if Bsum[-1]+B[j]<=K:
    Bsum.append(Bsum[-1]+B[j])
AAsum=[]
for i in range(N):
  AAsum.append(K-Asum[i])

#print(Asum)
#print(AAsum)
#print(Bsum)

C=[]
for i in range(len(Asum)):
  C.append(bisect.bisect(Bsum,K-Asum[i])+i-1)

#print(Asum)
#print(AAsum)
#print(Bsum)
#print(C)
print(max(C))

Buggy submission (verdict: Runtime Error):
import numpy as np
import bisect
N,M,K= map(int, input().split())
A=list(map(int, input().split()))
B=list(map(int, input().split()))
if A[0]>K and B[0]>K:print(0);exit()

Asum=[0]
for i in range(N):
  if Asum[-1]+A[i]<=K:
    Asum.append(Asum[-1]+A[i])  

Bsum=[0]
for j in range(M):
  if Bsum[-1]+B[j]<=K:
    Bsum.append(Bsum[-1]+B[j])
AAsum=[]
for i in range(N):
  AAsum.append(K-Asum[i])

print(Asum)
print(AAsum)
print(Bsum)
exit()
C=[]
for i in range(len(Asum)):
  C.append(bisect.bisect(Bsum,K-Asum[i])+i-1)

#print(Asum)
#print(AAsum)
#print(Bsum)
#print(C)
print(max(C))
Problem p02676 (python)

Fixed submission:
K=int(input())
S=input()
if len(S)<=K:print(S)
else:print(S[0:K]+'...')

Buggy submission (verdict: Runtime Error):
7
nikoandsolstice
Problem p02689 (python)

Fixed submission:
N,M=map(int,input().split())
H=list(map(int,input().split()))
A=[0]*M;B=[0]*M
C=[0]*N
for i in range(M):
  A[i],B[i]=map(int,input().split())

for i in range(M):
  if H[A[i]-1]<H[B[i]-1]:C[A[i]-1]+=1
  elif H[A[i]-1]>H[B[i]-1]:C[B[i]-1]+=1
  else:C[A[i]-1]+=1;C[B[i]-1]+=1
print(C.count(0))

Buggy submission (verdict: Runtime Error):
4 3
1 2 3 4
1 3
2 3
2 4
Problem p02699 (python)

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

Buggy submission (verdict: Runtime Error):
100 2
Problem p02596 (python)

Fixed submission:
K = int(input())

ans = 1
X = 7
cnt = K
while ans <= K:
    x = X % K
    if x == 0:
        print(ans)
        break
    else:
        ans += 1
        X = x*10 + 7 

if x != 0:
    print(-1)

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

ans = 1
X = 7
cnt = K
while ans <= K:
    x = X % K
    if rem == 0:
        print(ans)
        break
    else:
        ans += 1
        X = x*10 + 7 

if rem != 0:
    print(-1)

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

X = 10
ans = 1    
while ans <= L:
    L = 9*K/7
    x = X%L
    if x == 1:
        print(ans)
        break
    else:
        ans += 1
        X = x*10 

if x != 1:
    print(-1)

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

X = 10
ans = 1

if 
while ans <= 9000000:
    x = X%(9*K)
    if x == 1:
        print(ans)
        break
    else:
        ans += 1
        X = x*10 

if x != 1:
    print(-1)

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

for i in range(1, 10):
    if str(K*i)[-1] == "7":
        S = ""
        ans = 0
        while ans <= 100000:
            S += "7"
            ans += 1
            if int(S)%K == 0:
                Flag = True
                break

if Flag == True:
    print(ans)
else:
    print(-1)
Problem p02623 (python)

Fixed submission:
import bisect

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

A = list(map(int, input().split()))
B = list(map(int, input().split()))

a = [0]
b = [0]
for i in range(N):
    a += [a[i] + A[i]]
for i in range(M):
    b += [b[i] + B[i]]

ans = 0
for i in range(N+1):
    if a[i] <= K:
        ans = max(ans, i + bisect.bisect_right(b, K - a[i])-1)

print(ans)

Buggy submission (verdict: Runtime Error):
import bisect

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

A = list(map(int, input().split()))
B = list(map(int, input().split()))

a = [0]
b = [0]
for i in range(N):
    a += [a[i] + A[i]]
for i in range(M):
    b += [b[i] + B[i]]

ans = 0
for i in range(N+1):
    if A[i] <= K:
        ans = max(ans, i + bisect.bisect_right(b, K - a[i])-1)

print(ans)

Buggy submission (verdict: Runtime Error):
import bisect

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

A = list(map(int, input().split()))
B = list(map(int, input().split()))

a = [0]
b = [0]
for i in range(N):
    a += (a[i] + A[i])
for i in range(M):
    b += (b[i] + B[i])

ans = 0
for i in range(N+1):
    ans = max(ans, i + bisect.bisect_right(b, K - a[i]))

print(ans)
Problem p02659 (python)

Fixed submission:
from decimal import Decimal

a, b = map(Decimal, input().split())
print(int(a*b))

Buggy submission (verdict: Runtime Error):
a, b = map(float, input().split())
print(int(a//(1/b)))
Problem p02725 (python)

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

length = A[0] + K - A[-1]
for i in range(N-1):
    length = max(A[i+1] - A[i] , length)
    if length == A[i+1] - A[i]:
        ans = A[i] + K - A[i+1]
      
if length == A[0] + K - A[-1]:
    ans = A[-1] - A[0]
print(ans)

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

length = K//2
for i in range(N-1):
    length = max(A[i+1] - A[i], length)
    if lenghth == A[i+1] - A[i]:
        ans = A[i] + K - A[i+1]
      
if length <= K//2:
    ans = A[-1] - A[0]
print(ans)

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

length = K//2
for i in range(N-1):
    length = max(A[i+1] - A[i] , length)
    if lenghth == A[i+1] - A[i]:
        ans = A[i] + K - A[i+1]
      
if length == K//2:
    ans = A[-1] - A[0]
print(ans)
Problem p02753 (python)

Fixed submission:
S = input()
if S == "AAA" or S == "BBB":
    print("No")
else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
S = input()
if S = "AAA" or "BBB":
    print("No")
else:
    print("Yes")
Problem p02771 (python)

Fixed submission:
A, B, C = map(int, input().split())
if len({A, B, C}) == 2:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
A, B, C = map(int, input().split())
if len(set(A, B, C)) == 2:
    print("Yes")
else:
    print("No")
Problem p02820 (python)

Fixed submission:
import collections

N, K = map(int, input().split())
R, S, P = map(int, input().split())
T = list(input())

for i in range(N-K):
    if T[i] == T[i+K]:
        T[i+K] = "a"

c = collections.Counter(T)

print(c["r"]*P + c["s"]*R + c["p"]*S)

Buggy submission (verdict: Runtime Error):
import collections

N, K = map(int, input().split())
R, S, P = map(int, input().split())
T = list(input())

for i in range(N-K):
    if T[i] == T[i+K]:
        T[i+K] = "a"

c = colelctions.Counter(T)

print(c["r"]*P + c["s"]*R + c["p"]*S)
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):
from fractions import gcd
A,B=map(int,input().split())
print(A*B//fractions.gcd(A,B))

Buggy submission (verdict: Runtime Error):
from fractions import gcd

A,B=map(int,input().split())
print(A*B//fractions.gcd(A,B))

Buggy submission (verdict: Runtime Error):
import math
A, B = 3, 4
lcm = A//math.gcd(A, B)*B

print(lcm)

Buggy submission (verdict: Runtime Error):
from fractions import gcd

A, B = map(int, input().split())
lcm = A*B//fractions.gcd(A, B)

print(lcm)

Buggy submission (verdict: Runtime Error):
from fractions import gcd

A, B = map(int, input().split())
lcm = A//fractions.gcd(A, B)*B

print(lcm)
Problem p02881 (python)

Fixed submission:
N = int(input())
for i in range(1, 1+int(N**(1/2))):
    if N%i == 0:
        ans = i - 1 + (N//i -1)
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
for i in range(1, int(N**(1/2))):
    if N%i == 0:
        ans = i - 1 + (N//i -1)
print(ans)
Problem p02951 (python)

Fixed submission:
A, B, C = map(int, input().split())
print(max(C-(A-B), 0))

Buggy submission (verdict: Runtime Error):
A, B, C = map(int, input().split())
print(max(C-(A-B)), 0)
Problem p02954 (python)

Fixed submission:
S = input()

ans = [0]*(len(S))
cnt = 0
for i in range(len(S)-1):
    cnt += 1
    if S[i] == "R" and S[i+1] =="L":
        ans[i] += -(-cnt//2)
        ans[i+1] += cnt//2
        x = i
        cnt = 0
    if S[i] == "L" and S[i+1] =="R":
        ans[x] += cnt//2
        ans[x+1] += -(-cnt//2)
        cnt = 0
    if i == len(S)-2:
        cnt += 1
        ans[x] += cnt//2
        ans[x+1] += -(-cnt//2)    

print(*ans)

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

ans = [0]*(len(S))
cnt = 0
for i in range(len(S)-1):
    cnt += 1
    if S[i] == "R" and S[i+1] =="L":
        ans[i] += -(-cnt//2)
        ans[i+1] += cnt//2
        x = i
        cnt = 0
    if S[i] == "L" and S[i+1] =="R" or :
        ans[x] += cnt//2
        ans[x+1] += -(-cnt//2)
        cnt = 0
    if i == len(S)-2:
        cnt += 1
        ans[x] += cnt//2
        ans[x+1] += -(-cnt//2)    

print(*ans)

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


ans = [0]*(len(S))
cnt = 0
for i in range(len(S)-1):
    cnt += 1
    if S[i] == "R" and S[i+1] =="L":
        ans[i] += -(-cnt//2)
        ans[i+1] += cnt//2
        x = i
        cnt = 0
    if S[i] == "L" and S[i+1] =="R" or :
        ans[x] += cnt//2
        ans[x+1] += -(-cnt//2)
        cnt = 0
    if i == len(S)-2:
        cnt += 1
        ans[x] += cnt//2
        ans[x+1] += -(-cnt//2)
        

print(*ans)
Problem p03042 (python)

Fixed submission:
S = input()
if 1 <= int(S[:2]) <= 12 and 1 <= int(S[2:]) <= 12:
    print("AMBIGUOUS")
elif 1 <= int(S[2:]) <= 12:
    print("YYMM")
elif 1 <= int(S[:2]) <= 12:
    print("MMYY")
else:
    print("NA")

Buggy submission (verdict: Runtime Error):
S = input()
if 1 <= int(S[:2]) <= 12 and 1 <= int(S[2:]) <= 12:
    print("AMBIGUOUS")
elif int(S[:2]) > 12 and int(S[2:]) != 0:
    print("YYMM")
elif int(S[2:]) > 12 int(S[:2]) != 0:
    print("MMYY")
else:
    print("NA")
Problem p03072 (python)

Fixed submission:
N = int(input())
H = list(map(int, input().split()))
ans = 1
height = H[0]
for i in range(1, N):
    if H[i] >= height:
        ans += 1
        height = H[i]

print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
H = list(map(int, input().split()))
ans = 1
height = H[0]
for i in range(1, N+1):
    if H[i] >= height:
        ans += 1
        height = H[i]

print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
H = list(map(int, input().split())
ans = 1
height = H[0]
for i in range(1, N+1):
    if H[i] >= height:
        ans += 1
        height = H[i]

print(ans)
Problem p03075 (python)

Fixed submission:
a, b, c, d, e, k = [int(input()) for i in range(6)]
print("Yay!" if (e-a)<=k else ":(")

Buggy submission (verdict: Runtime Error):
a, b, c, d, e, k = [int(input()) for in range(6)]

Buggy submission (verdict: Runtime Error):
a, b, c, d, e, k = [int(input()) for in range(6)]
print("Yey!" if (e-a)<=k else ":(")

Buggy submission (verdict: Runtime Error):
a, b, c, d, e, k = [int(input()) for in range(6)]
print("Yey!" if (e-a)<=k else ":(")

Buggy submission (verdict: Runtime Error):
a, b, c, d, e, k = int(input()) for in range(6)
print("Yey!" if (e-a)<=k else ":(")

Buggy submission (verdict: Runtime Error):
a, b, c, d, e, k = int(input()) for i in range(6)
print("Yey!" if (e-a)<=k else ":(")

Buggy submission (verdict: Runtime Error):
a, b, c, d, e, k = int(input()) for i range(6)
print("Yey!" if (e-a)<=k else ":(")

Buggy submission (verdict: Runtime Error):
a, b, c, d, e, k = map(int, input().split())
print("Yey!" if (e-a)<=k else ":(")
Problem p03077 (python)

Fixed submission:
N=int(input())
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())
min=min(A, B, C, D, E)
print(-(-N//min)+4)

Buggy submission (verdict: Runtime Error):
N, A, B, C, D, E = map(int, input().split())
list=[A, B, C, D, E]
min=min(list)
print(-(-N//min)

Buggy submission (verdict: Runtime Error):
N, A, B, C, D, E = map(int, input().split())
min=min(A, B, C, D, E)
print(-(-N//min)

Buggy submission (verdict: Runtime Error):
N, A, B, C, D, E = map(int, input().split())
min=min(A, B, C, D, E)
print(N//min+1)

Buggy submission (verdict: Runtime Error):
N, A, B, C, D, E = map(int, input().split())
min=min(A, B, C, D, E)
print(-(-N//min))

Buggy submission (verdict: Runtime Error):
N, A, B, C, D, E = map(int, input().split())
min=min(A, B, C, D, E)
print(-(-N//min))

Buggy submission (verdict: Runtime Error):
N, A, B, C, D, E = map(int, input().separate())
min=min(A, B, C, D, E)
print(-(-N//min))
Problem p03208 (python)

Fixed submission:
N, K = map(int, input().split())
H=[int(input()) for i in range(N)]

H.sort()

ans = float("inf")
for i in range(N-K+1):
    ans = min(ans, H[K-N+i-1]-H[i])

print(ans)

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

H.sort()

ans = float("inf")
for i in range(N-K+1):
    ans = min(ans, H[i+N-K]-H[i])

print(ans)

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

H.sort()

ans = float("inf")
for i in range(N-K+1):
    ans = min(ans, H[i+N-K]-H[i])

print(ans)

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

H.sort()

ans = float("inf")
for i in range(N-K+1):
    ans = min(ans, H[i+N-K-1]-H[i])

print(ans)
Problem p03252 (python)

Fixed submission:
s=input()
t=input()
S=sorted(map(s.count,set(s)))
T=sorted(map(t.count,set(t)))
print("Yes" if S==T else "No")

Buggy submission (verdict: Runtime Error):
S= input()
T= input()
SS = {}
TT = {}
for i in range(len(S)):
    s = S[i]
    t = T[i]
    if s not in SS:
        SS[s] = t
    elif SS[s] != t:
        print("No")
        break
    if if t not in TT:
        TT[t] = s
    elif TT[t] != s:
        print("No")
        break
else:
    print("Yes")
Problem p03272 (python)

Fixed submission:
X, t = map(int, input().split())
print((X-t+1))

Buggy submission (verdict: Runtime Error):
print(eval(input().replace(" ","-")+1))
Problem p03631 (python)

Fixed submission:
a, b, c=input()
print('Yes' if a==c else 'No')

Buggy submission (verdict: Runtime Error):
a, b, c=input()
  print('Yes' if a==c else 'No')

Buggy submission (verdict: Runtime Error):
  A=input()
  print('Yes' if A==sorted(A) else 'No')