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

Fixed submission:
from sys import stdin
n, k = map(int, stdin.readline().rstrip().split())
a = [format(int(x), 'b')[::-1] for x in stdin.readline().rstrip().split()]

d = [0] * 64
maxlen = 0
for c in a:
    len_ = len(c)
    if len_ > maxlen:
        maxlen = len_
    for j in range(len(c)):
        if c[j] == '1':
            d[j] += 1

m = format(k, 'b')[::-1]
if len(m) >= maxlen:
    maxlen = len(m)
else:
    m = m + '0' * (maxlen - len(m))

flag = False
result = 0
for j in range(maxlen - 1, -1, -1):
    if d[j] >= n - d[j]:
        result = result * 2 + d[j]
        if m[j] == '1':
            flag = True
    else:
        if flag or m[j] == '1':
            result = result * 2 + n - d[j]
        else:
            result = result * 2 + d[j]

print(result)

Buggy submission (verdict: Runtime Error):
def calculate(j, eval, vval, ks):
    xi = max(eval)
    if xi == 0:
        return 0
    i = eval.index(xi)

    if d[i] >= n - d[i]:
        if ks[i] == '1':
            return calculate(i, eval[:i], vval[:i], ks[:i]) + sum(vval[i:])
        else:
            eval[i] = 0
            return vval[i] + calculate(j, eval, vval, ks)
    else:
        if ks[i] == '1':
            eval[i] = 0
            return vval[i] + calculate(j, eval, vval, ks)
        else:
            m = int(ks[:i + 1], 2)
            if m == 0:
                t = d[i] << (maxlen - i - 1)
                eval[i] = 0
                return t + calculate(j, eval, vval, ks)
            else:
                ks = format(m - 1, 'b')
                ks = '0'*(i - len(ks) + 1) + ks
                return calculate(i, eval[:i], vval[:i], ks[:i]) + sum(vval[i:])


if __name__ == "__main__":
    n, k = map(int, input().split())
    a = [format(int(x), 'b') for x in input().split()]

    maxlen = 40
    ks = format(k, 'b')
    ks = '0' * (maxlen - len(ks)) + ks

    d = [0] * maxlen
    for c in a:
        len_ = len(c)
        for j in range(len_):
            if c[j] == '1':
                d[j + maxlen - len_] += 1
    e = [0] * maxlen
    val = [0] * maxlen
    flag = True
    result = 0
    for j in range(maxlen):
        if flag:
            if ks[j] == '0' and d[j] == 0:
                continue
            else:
                flag = False
        e[j] = abs(2 * d[j] - n) << (maxlen - j - 1)
        if e[j] == 0:
            result += d[j] << (maxlen - j - 1)
        else:
            val[j] = max(d[j], n - d[j]) << (maxlen - j - 1)

    result += calculate(maxlen, e, val, ks)
    print(result)

Buggy submission (verdict: Runtime Error):
from sys import stdin
n, k = map(int, stdin.readline().rstrip().split())
a = [format(int(x), 'b') for x in stdin.readline().rstrip().split()]

m = format(k, 'b')
maxlen = len(m)

d = [0] * maxlen
for c in a:
    len_ = len(c)
    for j in range(len_):
        if c[j] == '1':
            d[j + maxlen - len_] += 1

flag = False
result = 0
for j in range(maxlen):
    if d[j] >= n - d[j]:
        result = result * 2 + d[j]
        if m[j] == '1':
            flag = True
    else:
        if flag or m[j] == '1':
            result = result * 2 + n - d[j]
        else:
            result = result * 2 + d[j]

print(result)
Problem p03141 (python)

Fixed submission:
import numpy as np

N = int(input())
x = []
y = []
for i in range(N):
    a, b = [int(_) for _ in input().split()]
    x.append(a)
    y.append(b)

nx = np.array(x)
ny = np.array(y)
ns = nx + ny
arr = np.array([nx, ny, ns]).T
arr = arr[np.argsort(arr[:, 2])][::-1, :]
n = np.sum(arr[0::2, 0]) - np.sum(arr[1::2, 1])
print(n)

Buggy submission (verdict: Runtime Error):
import numpy as np

N = int(input())
x = []
for i in range(N):
    x.extend(input().split())

a = np.array(x, dtype = 'int').reshape((3, 2))
s = a[:,0:1] + a[:,1:2]
a = np.hstack((a, s))
a = a[np.argsort(a[:, 2])][::-1, :]
n = np.sum(a[0::2, 0]) - np.sum(a[1::2, 1])
print(n)
Problem p03142 (python)

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

result = [-2] * N
edge_from = [[] for _ in range(N)]
edge_to = [[] for _ in range(N)]

for _ in range(N - 1 + M):
    A, B = map(int, input().split())
    edge_from[B-1].append(A-1)
    edge_to[A-1].append(B-1)

parent = []
for i in range(N):
    if len(edge_to[i]) > 0 and len(edge_from[i]) == 0:
        parent.append(i)
        result[i] = -1

while True:
    next_ = []
    for p in parent:
        for child in edge_to[p]:
            edge_from[child].remove(p)
            if len(edge_from[child]) == 0:
                result[child] = p
                next_.append(child)
    if len(next_) == 0:
        break
    parent = next_.copy()

for x in result:
    print(x + 1)

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

result = [-2] * N
edge_from = [[] for _ in range(N + 1)]
edge_to = [[] for _ in range(N + 1)]

for _ in range(N - 1 + M):
    A, B = map(int, input().split())
    edge_from[B].append(A)
    edge_to[A].append(B)

parent = []
for i in range(1, N + 1):
    if any(edge_to[i]) and not any(edge_from[i]):
        parent.append(i)
        result[i] = -1
        break

while True:
    next_ = []
    for p in parent:
        for child in edge_to[p]:
            edge_from[child].remove(p)
            if not any(edge_from[child]):
                result[child] = p
                next_.append(child)
    if not any(next_):
        break
    parent = next_

for x in result:
    print(x)

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

result = [-2] * N
edge_from = [[] for _ in range(N)]
edge_to = [[] for _ in range(N)]

for _ in range(N - 1 + M):
    A, B = map(int, input().split())
    edge_from[B-1].append(A-1)
    edge_to[A-1].append(B-1)

parent = []
for i in range(N):
    if any(edge_to[i]) and not any(edge_from[i]):
        parent.append(i)
        result[i] = -1

while True:
    next_ = []
    for p in parent:
        for child in edge_to[p]:
            edge_from[child].remove(p)
            if not any(edge_from[child]):
                result[child] = p
                next.append(child)
    if not any(next_):
        break
    parent = next_.copy()

for x in result:
    print(x + 1)

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

result = [-2] * N
edge_from = [[] for _ in range(N)]
edge_to = [[] for _ in range(N)]

for _ in range(N - 1 + M):
    A, B = map(int, input().split())
    edge_from[B-1].append(A-1)
    edge_to[A-1].append(B-1)

for i in range(N):
    if any(edge_to[i]) and not any(edge_from[i]):
        root = i
        break

result[root] = -1
parent = [root]
while True:
    next = []
    for p in parent:
        for child in edge_to[p]:
            edge_from[child].remove(p)
            if not any(edge_from[child]):
                result[child] = p
                next.append(child)
    if not any(next):
        break
    parent = next.copy()

for x in result:
    print(x + 1)
Problem p02536 (python)

Fixed submission:
from collections import deque
n, m = map(int ,input().split())
graph = [[] for _ in range(n)]
for i in range(m):
  a,b = map(int, input().split())
  graph[a-1].append(b-1)
  graph[b-1].append(a-1)
v = [0]*n
ans = 0
for i in range(n):
  if v[i] == 0:
    ans += 1
    q = deque()
    q.append(i)
    v[i] = 1
    while q:
      node = q.popleft()
      for j in graph[node]:
        if v[j] == 0:
          q.append(j)
          v[j] = 1
print(ans-1)

Buggy submission (verdict: Runtime Error):
n, m = map(int ,input().split())
graph = [[] for _ in range(n)]
for i in range(m):
  a,b = map(int, input().split())
  graph[a-1].append(b-1)
  graph[b-1].append(a-1)
v = [0]*n
def dfs(node):
  v[node] = 1
  for i in graph[node]:
    if v[i] == 0: dfs(i)
dfs(0)
ans = 0
for i in range(n):
  if v[i] == 0: dfs(i); ans += 1
print(ans)
Problem p02554 (python)

Fixed submission:
n = int(input())
mod = int(1e9)+7
print((pow(10, n, mod) - 2*pow(9, n, mod) + pow(8, n, mod))%mod)

Buggy submission (verdict: Runtime Error):
n = int(input())
n = int(input())
mod = int(1e9)+7
print((pow(10, n, mod) - 2*pow(9, n, mod) + pow(8, n, mod))%mod)
Problem p02613 (python)

Fixed submission:
import sys; input = sys.stdin.readline
n = int(input())
ac, wa, tle, re = 0, 0, 0, 0
for i in range(n):
    a = input().strip()
    if a == 'AC': ac+=1
    elif a == 'WA': wa += 1
    elif a == 'TLE': tle += 1
    elif a == 'RE': re += 1
print(f"AC x {ac}")
print(f"WA x {wa}")
print(f"TLE x {tle}")
print(f"RE x {re}")

Buggy submission (verdict: Runtime Error):
n = int(input())
ac, wa, tle, re = 0, 0, 0, 0
for i in range(n):
	a = input().strip()
    if a == 'AC': ac+=1
    elif a == 'WA': wa += 1
    elif a == 'TLE': tle += 1
    elif a == 'RE': re += 1
print(f"AC x {ac}")
print(f"WA x {wa}")
print(f"TLE x {tle}")
print(f"RE x {re}")
Problem p02760 (python)

Fixed submission:
A=[0]*9
for i in range(3):
    A[i*3:i*3+3]=input().split()
for i in range(int(input())):
    b=input()
    for j in range(9):
        if A[j]==b:
            A[j]="0"
s="012345678036147258048246"
a=f=0
for i in range(24):
    a+=int(A[int(s[i])])
    if i%3==2:
        if a==0:
            f+=1
        a=0
if f>0:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
S="012 345 678 036 147 258 048 246 "
A=sum([input().split()for i in range(4)],[])
for b in [input()for i in range(int(A[9]))]:
  if b in A:
    S=S.replace(str(A.index(b)),"")
print("YNeos"[1-"  "in S::2])

Buggy submission (verdict: Runtime Error):
S="012 345 678 036 147 258 048 246 "
A=sum([input().split()for i in range(4)],[])
for b in [input()for i in range(int(A[10]))]:
  if b in A:
    S=S.replace(str(A.index(b)),"")
print("YNeos"[S.find("  ")<0::2])
Problem p02534 (python)

Fixed submission:
k=int(input())
print("ACL"*k)

Buggy submission (verdict: Runtime Error):
k=int(input())
a=""
for i in range(k):
    a+=ACL
print(a)
Problem p02534 (python)

Fixed submission:
K=input()
r='ACL'
for i in range(1,int(K)):
  r='ACL'+ r 
print(r)

Buggy submission (verdict: Runtime Error):
K=input()
r='ACL'
for i in range(1,int(k)):
  r='ACL'+ r 
print(r)
Problem p02818 (python)

Fixed submission:
a,b,k=map(int,input().split())
ca=a-k
cb=max(min(b,b+ca),0)
ca=max(ca,0)
print('{} {}'.format(ca,cb))

Buggy submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
ansa=a-k
ansb=max(min(b,b+ansba,0)
ansa=max(a-k,0)
print('{} {}'.format(ansa,ansb))
Problem p02923 (python)

Fixed submission:
def resolve():
    n=int(input())
    h=list(map(int,input().split()))
    if n==1:
      print(0)
    else:
        ans=[0 for i in range(n)]
        if h[0]<h[1]:
            ans[0]=0
        else:
            ans[0]=1
        for i in range(1,n-1):
            if h[i]<h[i+1]:
                ans[i]=0
            else:
                ans[i]=ans[i-1]+1
        print(max(ans))
resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
    n=int(input())
    h=list(map(int,input().split()))
    ans=[0 for i in range(n)]
    if h[0]<h[1]:
        ans[0]=0
    else:
        ans[0]=1
    for i in range(1,n-1):
        if h[i]<h[i+1]:
            ans[i]=0
        else:
            ans[i]=ans[i-1]+1
    print(max(ans))
resolve()
Problem p02971 (python)

Fixed submission:
n=int(input())
a=[int(input()) for _ in range(n)]
p=a[::]
m=max(a)
a.remove(m)
m2=max(a)
for i in p:
  if i==m:
    print(m2)
  else:
    print(m)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=[int(input()) for _ in range(n)]
p=a[::]
m=max(a)
a.delete(m)
m2=max(a)
for i in p:
  if i==m:
    print(m2)
  else:
    print(m)
Problem p03029 (python)

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

Buggy submission (verdict: Runtime Error):
A,P=map(int,input().split())
return (A*3+P)//2
Problem p03150 (python)

Fixed submission:
s=input()
for i in range(len(s)):
	for j in range(i,len(s)+1):
		if s[:i]+s[j:]=='keyence':
			print('YES')
			break
	else:
		continue
	break
else:
	print('NO')

Buggy submission (verdict: Runtime Error):
s=input()
print('YES' if (len(s)>=7 and s[:3]=='key' and s[-4:]=='ence') or s[:7]=='keyence' or s[-7:]='keyence' else 'NO')
Problem p03262 (python)

Fixed submission:
import functools
import fractions

def resolve():
	n,x=map(int,input().split())
	x_list=list(map(int,input().split()))
	x_list.append(x)
	x_list.sort()
	a=[abs(x_list[i]-x_list[i+1]) for i in range(n)]
	print(functools.reduce(fractions.gcd,a))
resolve()

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


def resolve():
	n,x=map(int,input().split())
	x_list=list(map(int,input().split()))
	x_list.append(x)
	a=[i-j for i in x_list for j in x_list if i!=j]
	print(functools.reduce(math.gcd,a))
resolve()
Problem p03324 (python)

Fixed submission:
def resolve():
	d,n=map(int,input().split())
	ans=100**d*n if n<100 else 100**d*101
	print(ans)
resolve()

Buggy submission (verdict: Runtime Error):
d,n=map(int,input())
ans=100**d*n if n<100 else 100*d*101
print(ans)
Problem p03386 (python)

Fixed submission:
def resolve():
    a,b,k=map(int,input().split())
    realk=min(b-a+1,k)
    ans=list(range(a,a+realk))
    ans+=list(range(b-realk+1,b+1))
    answer=sorted(list(set(ans)))
    for i in answer:
        print(i)
    

resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
    a,b,k=map(int,input().split())
    l=list(range(a,b+1))
    ans=l[:k]
    ans+=l[-k:]
    answer=sorted(list(set(ans)))
    for i in answer:
        print(i)
resolve()
Problem p03547 (python)

Fixed submission:
x,y=map(str,input().split())
if x<y:
  print('<')
elif x>y:
  print('>')
else:
  print('=')

Buggy submission (verdict: Runtime Error):
x,y=map(input())
if x<y:
  print('<')
elif x>y:
  print('>')
else:
  print('=')
Problem p03587 (python)

Fixed submission:
print(sum([int(i) for i in input()]))

Buggy submission (verdict: Runtime Error):
print(sum(int(input())))
Problem p03632 (python)

Fixed submission:
a,b,c,d=map(int,input().split())
print(max(min(b,d)-max(a,c),0))

Buggy submission (verdict: Runtime Error):
a,b,c,d=map(int,input().split())
print(max(b-c),0)

Buggy submission (verdict: Runtime Error):
a,b,c,d=map(int,input().split())
print(max(b-c),0)
Problem p03635 (python)

Fixed submission:
n,m=map(int,input().split())
print((n-1)*(m-1))

Buggy submission (verdict: Runtime Error):
n,m=map(int(input().split())
print((n-1)*(m-1))
Problem p03636 (python)

Fixed submission:
a=input()
print('{}{}{}'.format(a[0],str(len(a)-2),a[-1]))

Buggy submission (verdict: Runtime Error):
a=input()
print('{}{}{}'.format(a[0],str(len(a)-2),a[-1])
Problem p04001 (python)

Fixed submission:
import itertools
N=input()
ans=0
l=itertools.product(range(2),repeat=len(N)-1)
for i in l:
	tmp=''
	for j in range(len(i)):
		if i[j]==0:
			tmp+=N[j]
		else:
			tmp+=N[j]+'+'
	tmp+=N[-1]
	ans+=eval(tmp)
print(ans)

Buggy submission (verdict: Runtime Error):
N=input()
ans=0
l=itertools.product(range(2),repeat=len(N)-1)
for i in l:
	tmp=''
	for j in range(len(i)):
		if i[j]==0:
			tmp+=N[j]
		else:
			tmp+=N[j]+'+'
	tmp+=N[-1]
	ans+=eval(tmp)
print(ans)
Problem p02600 (python)

Fixed submission:
x = int(input()) - 400
ans = 8

while x >= 200:
    x -= 200
    ans -= 1
    
print(ans)

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

for i in a[:k]:
    pre *= i
    
for i in range(k,n):
    now = pre * a[i] // a[i-k]
    
    if pre < now:
        print("Yes")
    
    else:
        print("No")
        
    pre = now
Problem p02675 (python)

Fixed submission:
n = int(input())

if n % 10 == 3:
    print("bon")

elif n % 10 in [0,1,6,8]:
    print("pon")
    
else:
    print("hon")

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
ans = [-1] * n
edge = [[] for _ in range(n)]

for _ in range(m):
    a,b = map(int,input().split())
    a -= 1
    b -= 1
    edge[a].append(b)
    edge[b].append(a)
    
import collections
que = collections.deque()
que.append(0)
    
while que:
    x = que.popleft()
    
    for to in edge[x]:
        if ans[to] == -1:
            ans[to] = x + 1
            que.append(to)
            
print("Yes")
print(*ans[1:],sep="\n")

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
AB = []
ans = [0] * (n-1)

for i in range(m):
    AB.append(list(map(int,input().split())))
    
import collections
que = collections.deque()
que.append(1)
    
while que:
    x = que.popleft()
    
    for i in AB:
        a = i[0]
        b = i[1]
        
        if a == x and ans[b-2] == 0:
            ans[b-2] = x
            que.append(b)
        elif b == x and ans[a-2] == 0:
            ans[a-2] = x
            que.append(a)
            
if 0 in ans:
    print("No")
else:
    print("Yes")
    
    for i in ans:
        print(i)
Problem p02681 (python)

Fixed submission:
s = input()
t = input()
ans = "No"

if s == t[:-1]:
    if len(s)+1 == len(t):
        ans = "Yes"
        
print(ans)

Buggy submission (verdict: Runtime Error):
n,m,x = map(int,input().split())
ans = 12*(10**5)+1
C = []
A = []

for _ in range(n):
    AC = list(map(int,input().split()))
    C.append(AC[0])
    A.append(AC[1:])

for i in range(2**n):
    understood = [0]*m
    cost = 0
    
    for j in range(n):
        if (i>>j)&1:
            cost += C[j]
            
            for k in range(m):
                understood[k] += A[j][k]
            
    if min(understood) >= x:
        ans = min(ans,cost)

if ans == 12*(10**5)+1:
    ans = -1
        
print(ans)
Problem p02761 (python)

Fixed submission:
n,m = map(int,input().split())
s = []
c = []
ans = [1]
for i in range(n-1):
    ans.append("0")
ANS = ""

for i in range(m):
    S,C = map(int,input().split())
    s.append(S)
    c.append(C)
    
for i in range(m):
    ans[s[i]-1] = c[i]
    
    if i == m-1:
        for j in range(n):
            ANS += str(ans[j])
            
for i in range(m):
    if s[i] == 1 and c[i]==0 and n!=1:
        ANS = -1
    
    for j in range(m):
        if s[i] == s[j] and c[i] != c[j]:
            ANS = -1
            
if m == 0:
    if n == 1:
        ANS = 0
    else:
        ANS = "1"+"0"*(n-1)
            
print(ANS)

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
s = []
c = []
ans = [1]
for i in range(n-1):
    ans.append("0")

for i in range(m):
    S,C = map(int,input().split())
    s.append(S)
    c.append(C)
    
for i in range(m):
    ans[s[i]-1] = c[i]
    
    if i == m-1:
        ANS = ""
        for j in range(n):
            ANS += str(ans[j])
            
for i in range(m):
    if s[i] == 1 and c[i]==0:
        ANS = -1
    
    for j in range(m):
        if s[i] == s[j] and c[i] != c[j]:
            ANS = -1
            
print(ANS)

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
s = []
c = []
ans = ["0" for i in range(n)]

for i in range(m):
    S,C = map(int,input().split())
    s.append(S)
    c.append(C)
    
for i in range(m):
    ans[s[i]-1] = c[i]
    
    if i == m-1:
        ANS = ""
        for j in range(n):
            ANS += str(ans[j])
            
for i in range(m):
    if s[i] == 1 and c[i]==0:
        ANS = -1
    
    for j in range(m):
        if s[i] == s[j] and c[i] != c[j]:
            ANS = -1
            
print(ANS)
Problem p02783 (python)

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

if h % a == 0:
    print(h//a)
else:
    print(h//a+1)

Buggy submission (verdict: Runtime Error):
h,n = map(int,input().split())
a = sum(map(int,input().split()))
print(["Yes","No"][h>a])
Problem p02784 (python)

Fixed submission:
h,_ = map(int,input().split())
a = sum(map(int,input().split()))
print((h>a)*"No" or "Yes")

Buggy submission (verdict: Runtime Error):
h,n = map(int,input().split())
a = eval(input().replace(" ","+"))
print(["Yes","No"][h>a])
Problem p02801 (python)

Fixed submission:
print(chr(ord(input())+1))

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
PS = [list(input().split()) for i in range(m)]
AC = []
WA = 0

for i in range(m):
    if PS[i][1] == "AC":
        p = PS[i][0]
        if p not in AC:
            WA += PS[:i+1].count([p,"WA"])
            AC.append(p)

print(len(AC),WA)
Problem p02817 (python)

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

print(T + S)

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

dic = {"r":"p" , "s":"r" , "p":"s"}
ANS = []

for i in range(N):
    ANS.append(dic[T[i]])
    
ans = "".join(ANS)

VANISH = []
    
for i in range(N-K):
    if ans[i] == ans[i+K]:
        VANISH.append(ans[i])
        
if N - (2*K) > 0:
    for i in range(N - (2*K)):
        if ans[i] == ans[i+(2*K)]:
            VANISH.remove(ans[i])
            
vanish = "".join(VANISH)
        
point = ((ans.count("r")-vanish.count("r"))*R + (ans.count("s")-vanish.count("s"))*S + (ans.count("p")-vanish.count("p"))*P)

print(point)
Problem p02885 (python)

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

if a <= 2*b:
    print(0)
if a > 2*b:
    print(a - 2*b)

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

heal = 0

for i in range(N):
    for j in range(i+1 , N):
        heal += deliciaus[i] * deliciaus[j]
    
print(heal)
Problem p02909 (python)

Fixed submission:
weather = input()

if weather == "Sunny":
    print("Cloudy")
elif weather == "Cloudy":
    print("Rainy")
else:
    print("Sunny")

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

if weather = Sunny:
    print(Cloudy)
elif weather = Cloudy:
    print(Rainy)
else:
    print(Sunny)
Problem p02921 (python)

Fixed submission:
S = input()
T = input()

result = 0
for i in range(0,3):
    if S[i] == T[i]:
        result += 1

print (result)

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

plug = 1
tap = 0

for i in range():
    if plug >= B:
        break
    else:
        prug += A - 1
        tap += 1

print(tap)

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

plug = 1
tap = 0

for i in range(20):
    if plug >= B:
        break
    else:
        prug += A - 1 and tap += 1

print(tap)
Problem p02922 (python)

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

plug = 1
tap = 0

for i in range(20):
    if plug >= B:
        break
    else:
        plug += A - 1
        tap += 1

print(tap)

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

plug = 1
tap = 0

for i in range():
    if plug >= B:
        break
    else:
        prug += A - 1 and tap += 1

print(tap)
Problem p02945 (python)

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

rist = [ A+B , A-B , A*B]

print(max(rist))

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())

rist = [ A+B , A-B , A*B]

print(max(rist))

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())

rist = [ A+B , A-B , A*B]

print(max(rist))

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())

rist = [ A+B , A-B , A*B]

rist.sort()
print(rist[3])

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())

rist = [ A+B , A-B , A*B]

rist.sort()

print(rist[3])
Problem p03035 (python)

Fixed submission:
import math

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

if A >= 13 :
    print(B)
elif A <= 5 :
    print(0)
else :
    print( math.floor(B/2) )

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

if A >= 13 :
    print(B)
elif A <= 5 :
    print(0)
elif : 5 < A < 13
    print( B/2 )
Problem p03076 (python)

Fixed submission:
food = [int(input()) for i in range(5)]
a = 10
OK = 0

for i in range(5):
    OK += food[i] % 10
    
if OK == 0:
    print(sum(food))
else:
    for i in range(5):
        x = food[i] % 10
        if 0 < x < a:
            a = x
            remove = food[i]

    food.remove(remove)

    ans = remove

    for i in range(4):
        ans += -(-food[i]//10)*10

    print(ans)

Buggy submission (verdict: Runtime Error):
food = [int(input()) for i in range(5)]
a = 10

for i in range(5):
    x = food[i] % 10
    if 0 < x < a:
        a = x
        remove = food[i]
        
food.remove(remove)

ans = remove

for i in range(4):
    ans += -(-food[i]//10)*10
    
print(ans)