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

Fixed submission:
N = int(input())
liss = {}
for i in range(N):
  s = input()
  a = "".join(sorted(s))
  if a in liss:
    liss[a] += 1
  else:
    liss[a] = 1

ans = 0
for cc in liss:
  ans = ans + (liss[cc] * (liss[cc] - 1) / 2)
print(int(ans))

Buggy submission (verdict: Runtime Error):
N = int(input())
liss = {}
for i in range(N):
  s = input()
  a = sorted(s)
  if a in liss:
    liss[a] += 1
  else:
    liss[a] = 1

ans = 0
for cc in liss:
  ans = ans + (liss[cc] * (liss[cc] - 1) / 2)
print(int(ans))

Buggy submission (verdict: Runtime Error):
N = int(input())
liss = {}
for i in range(N):
  s = input()
  a = sorted(s)
  if a in liss:
    liss[a] += 1
  else:
    liss[a] = 1

ans = 0
for cc in liss:
  ans = ans + (liss[cc] * (liss[cc] - 1) / 2)
print(int(ans))

Buggy submission (verdict: Runtime Error):
import collections
N = int(input())
liss = {}
for i in range(N):
  s = input()
  a = s.sorted()
  if a in liss:
    liss[a] += 1
  else:
    liss[a] = 1

ans = 0
for cc in liss:
  ans = ans + (liss[cc] * (liss[cc] - 1) / 2)
print(int(ans))

Buggy submission (verdict: Runtime Error):
import collections
N = int(input())
liss = []
for i in range(N):
  s = input()
  a = s.sorted()
  if a in liss:
    liss[a] += 1
  else:
    liss[a] = 1

ans = 0
for cc in liss:
  ans = ans + (liss[cc] * (liss[cc] - 1) / 2)
print(int(ans))

Buggy submission (verdict: Runtime Error):
import collections
N = int(input())
countr = []
liss = []
for i in range(N):
  s = input()
  a = collections.Counter(s)
  if a in liss:
    ind = liss.index(a)
    countr[ind] += 1
  else:
    liss.append(a)
    countr[len(liss)-1] = 1

ans = 0
for cc in countr:
  if cc > 1:
    ans = ans + cc * (cc - 1) / 2
print(ans)

Buggy submission (verdict: Runtime Error):
import collections
N = int(input())
s = [0]*N
countr = []
liss = []
for i in range(N):
  s[i] = input()
  a = collections.Counter(s[i])
  if a in liss:
    ind = liss.index(a)
    countr[ind] += 1
  else:
    liss.append(a)
    countr[len(liss)-1] = 1

ans = 0
for cc in countr:
  if cc > 1:
    ans = ans + cc * (cc - 1) / 2
print(ans)

Buggy submission (verdict: Runtime Error):
import collections
N = int(input())
s = [0]*N
counter = {}
for i in range(N):
  s[i] = input()
  a = collections.Counter(s[i])
  if a in counter:
    counter[a] += 1
  else:
    counter[a] = 1

ans = 0
for key in counter:
  if counter[key] > 1:
    ans = ans + counter[key] * (counter[key] - 1) / 2
print(ans)
Problem p03037 (python)

Fixed submission:
n, m = map(int,input().split())
 
l_p = 1
r_p = n
 
for j in range(m):
  l, r = map(int,input().split())
  if l > l_p:
    l_p = l
  if r < r_p:
    r_p = r

a = r_p - l_p + 1

if a > 0:
  print(a)
else:
  print(0)

Buggy submission (verdict: Runtime Error):
n, m = map(int,input().split())
 
l_p = 1
r_p = n
 
for j in range(m+1):
  l, r = map(int,input().split())
  if l > l_p:
    l_p = l
  if r < r_p:
    r_p = r

a = r_p - l_p + 1

print(a)
Problem p03059 (python)

Fixed submission:
A, B, T = map(int,input().split())
n = (T+0.5) // A
print(int(n*B))

Buggy submission (verdict: Runtime Error):
A, B, T = input()
ans = int(T)/int(A)*int(B)
print(ans)
Problem p02681 (python)

Fixed submission:
a = str(input())
b = str(input())
c = b[-1]
if a + c == b:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
a = str(input())
b = str(input())
c = b[-1]
if a + c == b:
    print("Yes")
else:
    print("No"

Buggy submission (verdict: Runtime Error):
A = input()
B = input()
del B[-1]
if A == B:
    print(Yes)
else:
    print(No)

Buggy submission (verdict: Runtime Error):
A = input()
B = input()
if len(A&B) == 1:
    print(Yes)
else:
    print(No)
Problem p02657 (python)

Fixed submission:
x,y = map(int,input().split())
print(x * y)

Buggy submission (verdict: Runtime Error):
a=int(input())
li = list(map(int,input().split()))
 
result = 1
for num in li:
  result = result * num
  if result > 10 ** 18:
    print(-1)
    
print(result)

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

result = 1
for num in li:
  result = result * num
  if result > 10 ** 18:
    print(-1)
    
print(result)
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())
ab = a * b

if ab % 2 == 0:
  print('Even')
else:
  print('Odd')
Problem p02664 (python)

Fixed submission:
t = input()

ans = t
tem = ''
if '?' in t :  
    if len(t) == 1 :
        ans = 'D'
    elif len(t) == 2 :
        if t[0] == '?' and t[1] == '?' :
            ans = 'PD'
        elif t[0] == '?' and t[1] == 'D':
            ans = 'PD'
        elif t[0] == '?' and t[1] == 'P':
            ans ='DP'
        elif t[1] == '?' and t[0] == 'P':
            ans = 'PD'
        elif t[1] == '?' and t[0] == 'D':
            ans = 'DD'
    else:
        for i in range(0,len(t)):
            if i == 0 :
                if t[i] == '?' and t[i+1] == 'P':
                    ans = 'D'
                elif t[i] == '?' :
                    ans = 'P'
                else :
                    ans = t[i] 
                    
            elif i == len(t)-1 :
                if t[i] == '?' :
                    ans += 'D'
                else:
                    ans += t[i]
            else:
                if t[i] == '?':
                    if ans[i-1] == 'P':
                        ans += 'D'
                    elif t[i+1] == 'D' or t[i+1] == '?':
                        ans += 'P'
                    else:
                        ans += 'D'
                else:
                    ans += t[i]
print(ans)

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

ans = t
tem = ''
if '?' in t :  
    if len(t) == 1 :
        ans = 'D'
    elif len(t) == 2 :
        if t[0] == '?' and t[1] == '?' :
            ans = 'PD'
        elif t[0] == '?' and t[1] == 'D':
            ans = 'PD'
        elif t[0] == '?' and t[1] == 'P':
            ans ='DP'
        elif t[1] == '?' and t[0] == 'P':
            ans = 'PD'
        elif t[1] == '?' and t[0] == 'D':
            ans = 'DD'
    else:
        for i in range(0,len(t)):
            if i == 0 :
                if t[i] == '?' and t[i+1] == 'P':
                    ans = 'D'
                else :
                    ans = 'P'
                    
            elif i == len(t) :
                if t[i] == '?' :
                    ans += 'D'
                else:
                    ans += t[i]
            else:
                if t[i] == '?':
                    if ans[i-1] == 'P':
                        ans += 'D'
                    elif t[i+1] == 'D':
                        ans += 'P'
                    else:
                        ans += 'D'
                else:
                    ans += t[i]
print(ans)
Problem p02717 (python)

Fixed submission:
x,y,z = map(int,input().split())

print(z,x,y)

Buggy submission (verdict: Runtime Error):
x,y,z = map(input().split())

print(z,x,y)
Problem p02718 (python)

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

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

list.sort(a, reverse=True)

ans = "No"


if a[m-1] >= sum(a)/(4*m) :
  ans = "Yes"
print (ans)

Buggy submission (verdict: Runtime Error):

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

list.sort(a, reverse=True)

ans = "No"


if a[m-1] >= sum(a)/(4*m) :
  ans = "Yes"
print (ans)
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()))
#n = 5
#p = [4,2,5,1,3]
maxcnt = 1
cnt = 1
for i in range(n):
    box = 0
    cnt = 1
    box = p[i]
    if n - i < maxcnt :
        break

    for j in range(i + 1 , n ):
        if i < j and box >= p[j]:
            box = p[j]
            cnt += 1
            if maxcnt < cnt :
                maxcnt = cnt
            
print(maxcnt)
Problem p02882 (python)

Fixed submission:
import math

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

q = a*b*b/2/x
w = (2*b-2*x/a**2)/a

if 2*x/a/b <= a:
  print(math.degrees(math.atan(q)))
else:
  print(math.degrees(math.atan(w)))

Buggy submission (verdict: Runtime Error):
import math

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

q = a*b*b/2/x

print(math.degrees(math.atan(q))

Buggy submission (verdict: Runtime Error):
import math

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

q = a*b*b/(2*x)

print(math.degrees(math.atan(q))

Buggy submission (verdict: Runtime Error):
import math

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

q = (a*b*b)/(2*x)

print(math.degrees(math.atan(q))
Problem p02898 (python)

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

h.sort()
a = 0

for i in range(N):
  if h[i] >= K:
    a += i
    break
  else:
    continue
if max(h) < K:
  a += N
print(N-a)

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

h.sort()
a = 0

for i in range(N):
  if h[i] >= K:
    a += i
    break
  else:
    continue
if max(a) < K:
  a += N
print(N-a)
Problem p02934 (python)

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

M = 0
for l in range(N):
  M += 1/A[l]
print(1/M)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = []
for i in range(N):
  A.append(int(input()))

M = 0
for l in range(N):
  M += 1/A[l]
print(1/M)
Problem p02946 (python)

Fixed submission:
K,X = map(int,input().split())
A = []
for i in range(X-(K-1),X+(K-1)+1):
  A.append(i)
print(*A)

Buggy submission (verdict: Runtime Error):
K,X = map(int,input().split())
A = []
for i in range(X-(K-1),X+(K-1)+1):
  A.append(i)
print(" ".join(A[0]))

Buggy submission (verdict: Runtime Error):
K,X = map(int,input().split())
A = []
for i in range(X-(K-1),X+(K-1)+1):
  A.append(i)
print(" ".join(A))
Problem p02988 (python)

Fixed submission:
n = int(input())
p = list(map(int,input().split()))
a = 0
for i in range(1,n-1):
  if p[i-1] < p[i] < p[i+1] or p[i+1] < p[i] < p[i-1]:
    a += 1
print(a)

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

Buggy submission (verdict: Runtime Error):
n = input()
p = list(map(int,input().split()))
a = 0
for i in range(1,n):
  if p[i-1] < p[i] < p[i+1] or p[i+1] < p[i] < p[i-1]:
    a += 1
print(a)
Problem p03029 (python)

Fixed submission:
a,p = map(int,input().split())
print((3*a+p)//2)

Buggy submission (verdict: Runtime Error):
a,p = map(int,input().split())
print((3＊a+p)//2)

Buggy submission (verdict: Runtime Error):
a,p = map(int,input().split())
print(int((3＊a+p)/2))

Buggy submission (verdict: Runtime Error):
a,p = map(int,input().split())
print(int((3＊a+p)/2)
Problem p03048 (python)

Fixed submission:
R,G,B,N = map(int, input().split())
c = 0
for i in range(0,int(N/R)+1):
    for j in range(0,int((N-R*i)/G)+1):
        if (N-R*i-G*j)%B == 0:
            c += 1
print(c)

Buggy submission (verdict: Runtime Error):
R,G,B,N = map(int, input().split())
c = 0
for i in range(0,int(N/R)+1):
    for j in range(0,int((N-R*i)/G)+1):
        if (N-R*i-G*j)%B = 0:
            c += 1
print(c)

Buggy submission (verdict: Runtime Error):
R,G,B,N = map(int, input().split())
c = 0
for i in range(0,int(N/R)+1):
    for j in range(0,int((N-R*i)/G)+1):
	    if (N-R*i-G*j)%B = 0:
            c += 1
print(c)

Buggy submission (verdict: Runtime Error):
R,G,B,N = map(int, input().split())
c = 0
for i in range(0,int(N/R)+1):
    for j in range(0,int((N-R*i)/G)+1):
		if (N-R*i-G*j)%B = 0:
        	c += 1
print(c)

Buggy submission (verdict: Runtime Error):
R,G,B,N = map(int, input().split())
c = 0
for i in range(0,int(N/R)+1):
    for j in range(0,int((N-R*i)/G)+1):
		if (N-R*i-G*j)%B = 0:
        	c += 1
print(c)
Problem p03049 (python)

Fixed submission:
N = int(input())
S = [input() for _ in range(N)]
ans = 0
ba = b = a = 0
for s in S:
    ans += s.count('AB')
    if s[0] + s[-1] == 'BA':
        ba += 1
    if s[0] == 'B':
        b += 1
    if s[-1] == 'A':
        a += 1
ans += min(a, b)
if a == b == ba and b:
    ans -= 1
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
s = []
for i in range(N):
	s.append(input())
c = 0
for j in range(len(s)):
	c += s[j].count("AB")
a = 0
b = 0
for k in range(len(s)):
	if s[k][-1] == "A":
        a += 1
for l in range(len(s)):
	if s[l][0] == "B":
        b += 1
print(c+min(a,b))

Buggy submission (verdict: Runtime Error):
N = int(input())
s = []
for i in range(N):
	s.append(input())
c = 0
for j in range(len(s)):
	c += s[j].count("AB")
a = 0
b = 0
for k in range(len(s)):
	if s[k][-1] == "A":
        a += 1
for l in range(len(s)):
	if s[l][0] == "B":
        b += 1
print(c+min(a,b))

Buggy submission (verdict: Runtime Error):
N = int(input())
s = []
for i in range(N):
	s.append(input())
c = 0
for j in range(len(s)):
	c += s[i].count("AB")
a = 0
b = 0
for k in range(len(s)):
	if s[i][-1] == "A":
        a += 1
for l in range(len(s)):
	if s[i][0] == "B":
        b += 1
print(c+min(a,b))

Buggy submission (verdict: Runtime Error):
N = int(input())
s = []
for i in range(N):
	s.append(input())
c = 0
for j in range(len(s)):
	c += s[i].count("AB")
a = 0
b = 0
for k in range(len(s)):
	if s[i][-1] == "A":
        a += 1
for l in range(len(s)):
	if s[i][0] == "B":
        b += 1
print(c+Math.min(a,b))

Buggy submission (verdict: Runtime Error):
N = int(input())
s = []
for i in range(N):
	s.append(input())
c = 0
for j in len(s):
	c += s[i].count("AB")
a = 0
b = 0
for k in range(len(s)):
	if s[i][-1] == "A":
    	a += 1
for l in range(len(s)):
	if s[i][0] == "B":
    	b += 1
print(c+Math.min(a,b))

Buggy submission (verdict: Runtime Error):
N = int(input())
s = []
for i in range(N):
	s.append(input())
c = 0
for j in len(s):
	c += s[i].count("AB")
a = 0
b = 0
for k in len(s):
	if s[i][-1] == "A":
    	a += 1
for l in len(s):
	if s[i][0] == "B":
    	b += 1
print(c+Math.min(a,b))

Buggy submission (verdict: Runtime Error):
N = int(input())
s = []
for i in range(N):
	s.append(input())
l = list(itertools.combinations(s,len(s))
m = []
for j in range(N):
	new_s = "".join(s[i])
    num = new_s.count("AB")
    m.append(num)
print(max(m))

Buggy submission (verdict: Runtime Error):
N = int(input())
s = []
for i in range(N):
	s.append(input())
l = list(itertools.combinations(s,len(s))
m = []
for j in range(N):
	new_s = "".join(s[i])
    num = new_s.count("AB")
    m.append(num)
print(max(m))
Problem p03059 (python)

Fixed submission:
A,B,T = map(int, input().split())
i = int(T/A)
print(B*i)

Buggy submission (verdict: Runtime Error):
A,B,T = map(int, input().split())
for i in range(T/A):
	i += B
print(i)

Buggy submission (verdict: Runtime Error):
A,B,T = map(int, input().split())
for i in range(T/A)
	i += B
print(i)
Problem p03060 (python)

Fixed submission:
N = int(input())
V = list(map(int, input().split()))
C = list(map(int, input().split()))

s = 0
for i in range(N):
	if V[i] >= C[i]:
		s += V[i]-C[i]
	else:
		s += 0
print(s)

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

s = 0
for i in range(1,N+1):
	if V[i] >= C[i]:
		s += V[i]-C[i]
	else:
		s += 0
print(s)

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

s = 0
for i in range(N):
	if V[i] >= C[i]:
		s += V[i]-C[i]
	else:
		s += 0
print(s)

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

s = A
for i in range(N):
	if V[i] >= C[i]:
		s += V[i]-C[i]
	else:
		s += 0
print(s)

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

s = A
for i in range(N)
	if V[i] >= C[i]:
		s += V[i]-C[i]
	else:
		s += 0
print(s)
Problem p03071 (python)

Fixed submission:
A,B = map(int,input().split())
if A == B:
	print(A+B)
elif A < B:
    print(B*2-1)
else:
    print(A*2-1)

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

cnt = 0
for i in range(len(H)):
    if (max(H[0:i]) <= 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(len(H)):
    if (max(H[0:i+1]) == H[i]):
        cnt += 1

print(cnt)

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

cnt = 0
for i in range(1:N+1):
    if (max(H[0:i+1]) == H[i]):
        cnt += 1

print(cnt)

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

cnt = 0
for i in range(len(H)):
    if (max(H[0:i+1]) == H[i]):
        cnt += 1

print(cnt)

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

cnt = 0
for i in range(len(H)):
    if (max(H[0:i+1]) == H[i]):
        cnt += 1

print(cnt)

Buggy submission (verdict: Runtime Error):
A,B = map(int,input().split())
if A = B:
	print(A+B)
elif A < B:
    print(B*2-1)
else:
    print(A*2-1)
Problem p02657 (python)

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

print(L*R)

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

ans=1
for i in range(N):
    ans *= num[i]
    if ans > 10**18:
        ans=-1
print(ans)
Problem p02789 (python)

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

if n==m:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
import fractions
N=int(input())
a = list(map(int, input().split()))

#------------最小公倍数---------------------
lcm = a[0]
for i in range(1, N):
    lcm = lcm * a[i] // fractions.gcd(lcm, a[i])
#------------------------------------------
ans=0

for j in a:
    ans += lcm // j
ans %= 1000000007
print(ans)
Problem p02865 (python)

Fixed submission:
import math
n = int(input())
if n%2==0:

    print(round(((n-2)/2)))


else:
    print(round(((n+1)/2)-1))

Buggy submission (verdict: Runtime Error):
from scipy.special import comb
n = int(input())
if n/2==0:
    print(math.factorial(n)-1)
    
else:
  	print(math.factorial(n))
Problem p02657 (python)

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

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

for n in range(N):
  A = int(input())
  if A == 0:
    result = 0
    break
  result = result*A
  if result>1000000000000000000:
    result = -1
    break

print(result)
Problem p02658 (python)

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
finish = 0
result = 1

if 0 in A:
    print(0)
    finish = 1
else:
    for n in range(N):
        result = result*A[n]
        if result > 10**18:
            print(-1)
            finish = 1
            break

    if finish == 0:
        print(result)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
finish = 0
result = 1

if 0 in A:
    print(0)
    finish = 1
else:
    
    for n in range(N):
        result = result*A[n]
        if result > 1000000000000000000:
            print(-1)
            finish = 1

if finish = 0:
    print(result)

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

for n in range(N):
  A = int(input())
  if A == 0:
    result = 0
    break
  result = result*A
  if result>1000000000000000000:
    result = -1
    break

print(result)

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

if 0 in A:
  print(0)
elif:
  result = 1
  for n in range(N):
    result = result*A[n]
  if result>1000000000000000000:
    print(-1)
  else:
    print(result)
Problem p02677 (python)

Fixed submission:
import math
 
A,B,H,M = map(int,input().split())
s = 60*H+M
a = s*0.5
b = M*6
theta = 0
 
if abs(a-b)<=180:
    theta = abs(a-b)
else:
    theta = 360- abs(a-b)

C=(A*A)+(B*B)-(2*A*B)*math.cos(math.radians(abs(a-b)))
print(math.sqrt(C))

Buggy submission (verdict: Runtime Error):
import math

A,B,H,M = map(int,input().split())
s = 60*H+M
a = s*0.5
b = M*6
theta = 0

if abs(a-b)<=180:
    theta = abs(a-b)
else:
    theta = 360- abs(a-b)

C=A*A+B*B−2*A*B*math.cos(math.radians(abs(a-b)))
print(math.sqrt(C))
Problem p02681 (python)

Fixed submission:
S = input()
T = input()
if len(T)==1:
    print("No")
elif S==T[0:-1]:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
A,B,C,K = map(int,input().split())
if K<=A:
    print(K)
elif A<K and K<=A+B:
    print(A)
else:
    print(A-(K-A-B))
Problem p02718 (python)

Fixed submission:
N,M = map(int,input().split())
A = list(map(int,input().split()))
new_A = []
for i in range(N):
  if A[i] >= sum(A)/(4*M):
    new_A.append(A[i])

if len(new_A)>=M:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
A = map(int,input().split())
new_A = []
for i in range(N):
  if A[a] >= 1/(4*M):
    new_A.append(a)
 
if len(new_A)>=M:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
A = []
for i in range(N):
  a = int(input()) 
  if a >= 1/(4*M):
    A.append(a)

if len(A)>=M:
  print("Yes")
else:
  print("No")
Problem p02741 (python)

Fixed submission:
l = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
n = int(input())
print(l[n-1])

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

Buggy submission (verdict: Runtime Error):
H,W = map(int,input().split())
if H%2 != 0:
  H= H+1
if W%2 != 0:
  W=W+1
print(int(H*W/2))
Problem p02817 (python)

Fixed submission:
S,T = input().split()
print(T+S)

Buggy submission (verdict: Runtime Error):
s=input()
t=input()
print(t+s)

Buggy submission (verdict: Runtime Error):
s = input()
t = input()
print(t+s)
Problem p02818 (python)

Fixed submission:
a,b,k = map(int, input().split())
if a >= k:
  print(a-k,"",b)
elif b > (k-a):
  print(0,"",b-(k-a))
else:
  print(0,"",0)

Buggy submission (verdict: Runtime Error):
a,b,k = map(int, input().split())
if a => k:
  print(a-k," ",b)
elif b > (k-a):
  print(0," ",b-(k-a)):
else:
  print(0," ",0)
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 p03059 (python)

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

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
A.sort()
D = [A[i+1]-A[i] for i in range(len(A)-1)]
 
if N == 2:
  print(max(A))
elif len(set(A))==1:
  print(A[0])
else:
  for d in D:
    cnt = 0
    for a in A:
      if a%d != 0:
        cnt = cnt+1
    if cnt <=1:
      print(i)
      break
Problem p03060 (python)

Fixed submission:
N = int(input())
V = list(map(int,input().split()))
C = list(map(int,input().split()))

ans = 0
for i in range(N):
  if V[i] > C[i]:
    ans = ans + (V[i]-C[i])

print(ans)

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

anc = 0
for i in range(N):
  if V[i] > C[i]:
    anc = anc + (V[i]-C[i])

print(ans)
Problem p03149 (python)

Fixed submission:
l = set([int(e) for e in input().split()])
set_1974 = set([1,9,7,4])

if l == set_1974:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
output_word = "YES"
set_1974 = (1,9,7,4)

for i in range(4):
  if int(input()) not in set_1974:
	output_word = "NO"
    
print(output_word)

Buggy submission (verdict: Runtime Error):
l = map(int, raw_input().split())
set_1974 = (1,9,7,4)

output_word = "YES"
for i in l:
  if i not in set_1974:
    output_word = "NO"
print(output_word)