Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
keys = []
 
for _ in range(M):
    cost, _ = map(int, input().split())
    mask = 0
    for i in map(int, input().split()):
        mask |= (1 << (i - 1))
    keys.append((cost, mask))

import collcetions
allstate = (1 << N) - 1
dp = collections.defaultdict(lambda:float('inf'))
dp[0] = 0
 
for cost, key_set in keys:
    ndp = dp.copy()
    for state, val in dp.items():
        ndp[state|key_set] = min(ndp[state|key_set], val + cost)
    dp = ndp
if allstate in dp:
    print(dp[allstate])
else:
    print(-1)

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

for _ in range(M):
    cost, _ = map(int, input().split())
    mask = 0
    for i in map(int, input().split()):
        mask |= (1 << (i - 1))
    keys.append((cost, mask))


allstate = (1 << N) - 1
dp = [float('inf')] * (1<<N)
dp[0] = 0

for cost, key_set in keys:
    for state in range(1<<N):
        if dp[state] == float('inf'): continue
        nstate = state | key_set
        dp[nstate] = min(dp[nstate], dp[state] + cost)

print(dp[-1] if dp[-1] != float('inf') else -1)

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

for _ in range(M):
    cost, _ = map(int, input().split())
    mask = 0
    for i in map(int, input().split()):
        mask |= (1 << (i - 1))
    keys.append((cost, mask))


allstate = (1 << N) - 1
dp = [float('inf')] * (1<<N)
dp[0] = 0

for cost, key_set in keys.items():
    for state in range(1<<N):
        if dp[state] == float('inf'): continue
        nstate = state | key_set
        dp[nstate] = min(dp[nstate], dp[state] + cost)

print(dp[-1] if dp[-1] != float('inf') else -1)


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

for _ in range(M):
    cost, _ = map(int, input().split())
    mask = 0
    for i in map(int, input().split()):
        mask |= (1 << (i - 1))
    keys.append((cost, mask))


allstate = (1 << N) - 1
dp = [float('inf')] * (1<<N)
dp[0] = 0

for cost, key_set in keys:
    for state in range(1<<N):
        if dp[state] == float('inf'): continue
        nstate = state | key_set
        dp[nstate] = min(dp[nstate], dp[state] + cost)

print(dp[-1] if dp[-1] != float('inf') else -1)
Buggy python submission (verdict: Runtime Error):
n = int(input())
s = input()
 
res = 0
dp = [[0]* (1+n) for _ in range(n+1)]
for i in range(n-1, -1, -1):
    for j in range(i+1, n):
        if s[i] == s[j]:
            dp[i][j] = dp[i+1][j+1] + (j - i > dp[i+1][j+1])
            res = max(res, dp[i][j]
print(res)

Fixed submission:
n = int(input())
s = input()

def check(length):
    d = set()
    for i in range(n - 2 * length + 1):
        d.add(s[i:i + length])
        if s[i + length:i + 2 * length] in d:
            return True
    return False
 
 
lo = 0
hi = n // 2 + 1
while lo + 1 < hi:
    mid = (lo + hi) // 2
    if check(mid):
        lo = mid
    else:
        hi = mid
if check(hi):
	print(hi)
else:
  	print(lo)

Buggy python submission (verdict: Runtime Error):
n = int(input())
s = input()
 
mx = 0
for length in range(1, n):
    t = 0
    for u in range(n - length):
        t = t + 1 if s[i] == s[i + length] else 0
        mx = max(mx, min(length, t))
 
print(mx)

Fixed submission:
n = int(input())
s = input()

def check(length):
    d = set()
    for i in range(n - 2 * length + 1):
        d.add(s[i:i + length])
        if s[i + length:i + 2 * length] in d:
            return True
    return False
 
 
lo = 0
hi = n // 2 + 1
while lo + 1 < hi:
    mid = (lo + hi) // 2
    if check(mid):
        lo = mid
    else:
        hi = mid
if check(hi):
	print(hi)
else:
  	print(lo)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = input()

import collections
dp = collections.defaultdict(int)
for i in range(n-1, -1, -1):
    for j in range(i+1, n):
        if s[i] == s[j]:
            dp[i,j] = dp[i+1, j+1] + (j - i > dp[i+1, j+1])
try:
    print(max(dp.values()))
except:
    print(0)


Fixed submission:
n = int(input())
s = input()

def check(length):
    d = set()
    for i in range(n - 2 * length + 1):
        d.add(s[i:i + length])
        if s[i + length:i + 2 * length] in d:
            return True
    return False
 
 
lo = 0
hi = n // 2 + 1
while lo + 1 < hi:
    mid = (lo + hi) // 2
    if check(mid):
        lo = mid
    else:
        hi = mid
if check(hi):
	print(hi)
else:
  	print(lo)

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

import collections
dp = collections.defaultdict(int)
for i in range(n-1, -1, -1):
    for j in range(i+1, n):
        if s[i] == s[j]:
            dp[i,j] = dp[i+1, j+1] + (j - i > dp[i+1, j+1])
print(max(dp.values()))

Fixed submission:
n = int(input())
s = input()

def check(length):
    d = set()
    for i in range(n - 2 * length + 1):
        d.add(s[i:i + length])
        if s[i + length:i + 2 * length] in d:
            return True
    return False
 
 
lo = 0
hi = n // 2 + 1
while lo + 1 < hi:
    mid = (lo + hi) // 2
    if check(mid):
        lo = mid
    else:
        hi = mid
if check(hi):
	print(hi)
else:
  	print(lo)
Buggy python submission (verdict: Runtime Error):
# coding: utf-8
# Here your code !
data = input()

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






Fixed submission:
# coding: utf-8
# Here your code !
data = input()

if data == "SUN":
    print(7)
elif data == "MON":
    print(6)
elif data == "TUE":
    print(5)
elif data == "WED":
    print(4)
elif data == "THU":
    print(3)
elif data == "FRI":
    print(2)
elif data == "SAT":
    print(1)
Buggy python submission (verdict: Time Limit Exceeded):
# coding: utf-8
# Your code here!

K,S = map(int,input().split())
result =0

for x in range(K+1):
    for y in range(K + 1):
        for z in range(K+1):
            if x+y+z == S:
                result += 1

print(result)

Fixed submission:
# coding: utf-8
# Your code here!

K,S = map(int,input().split())
result =0

for x in range(K+1):
    for y in range(K+1):
        z = S - x - y
        if 0 <= z <= K:
            result += 1

print(result)
Buggy python submission (verdict: Runtime Error):
import numpy as np
import pandas as pd

n, c = list(map(int, input().split(' ')))
x, v = [], []

for i in range(n):
  x_, v_ = list(map(int, input().split(' ')))
  x.append(x_)
  v.append(v_)
x = np.array(x)
v = np.array(v)
sum_v = np.cumsum(v)
inv_x = c - x[::-1]
inv_v = v[::-1]
sum_inv_v = np.cumsum(inv_v)

cal = sum_v - x
inv_cal = sum_inv_v - inv_x

cal_cummax = pd.Series(cal).cummax().as_matrix()
inv_cal_cummax = pd.Series(inv_cal).cummax().as_matrix()

fr_double_cal = sum_v - 2 * x + \
    np.insert(inv_cal_cummax[:-1], 0, 0)[::-1]
fl_double_cal = sum_inv_v - 2 * inv_x + \
    np.insert(cal_cummax[:-1], 0, 0)[::-1]

print(np.max(
    [0, cal.max(), inv_cal.max(), fr_double_cal.max(), fl_double_cal.max()]))


Fixed submission:
import numpy as np

n, c = list(map(int, input().split(' ')))
x, v = [], []

for i in range(n):
  x_, v_ = list(map(int, input().split(' ')))
  x.append(x_)
  v.append(v_)
x = np.array(x)
v = np.array(v)
sum_v = np.cumsum(v)
inv_x = c - x[::-1]
inv_v = v[::-1]
sum_inv_v = np.cumsum(inv_v)

cal = sum_v - x
inv_cal = sum_inv_v - inv_x

cal_cummax = np.maximum.accumulate(cal)
inv_cal_cummax = np.maximum.accumulate(inv_cal)

fr_double_cal = sum_v - 2 * x + \
    np.insert(inv_cal_cummax[:-1], 0, 0)[::-1]
fl_double_cal = sum_inv_v - 2 * inv_x + \
    np.insert(cal_cummax[:-1], 0, 0)[::-1]

print(np.max(
    [0, cal.max(), inv_cal.max(), fr_double_cal.max(), fl_double_cal.max()]))
Buggy python submission (verdict: Runtime Error):

import bisect

if 1:
    N,W = map(int, input().split(' '))
    w,v = [],[]
    for i in range(N):
        w_,v_ = map(int, input().split(' '))
        w.append(w_)
        v.append(v_)
else:
    N,W = 4,6
    w = [2,3,4,3]
    v = [1,4,10,4]

w0 = w[0]

idxs = set()
for i in range(N):
    for j in range(3*i+1):
        if i*w0+j <= W:
            idxs.add(i*w0+j)
idxs = list(idxs) 
idx_dict = {idx:i for i,idx in enumerate(idxs)}

dp = [[0 for j in range(len(idxs))] for i in range(N+1)]

for i in range(N):
    for j in range(len(idxs)):
        if idxs[j] < w[i]:
            dp[i+1][j] = dp[i][j]
        else:
            k = bisect.bisect_left(idxs, idxs[j]-w[i])
            dp[i+1][j] = max([dp[i][j],dp[i][idx_dict[idxs[k]]]+v[i]])
                
print(dp[-1][-1])

Fixed submission:

if 1:
    N,W = map(int, input().split(' '))
    w,v = [],[]
    for i in range(N):
        w_,v_ = map(int, input().split(' '))
        w.append(w_)
        v.append(v_)
else:
    N,W = 4,6
    w = [2,3,4,3]
    v = [1,4,10,4]

w0 = w[0]

idxs = set()
for i in range(N+1):
    for j in range(3*i+1):
        if i*w0+j <= W:
            idxs.add(i*w0+j)
idxs = sorted(list(idxs))
idx_dict = {idx:i for i,idx in enumerate(idxs)}

dp = [[0 for j in range(len(idxs))] for i in range(N+1)]

for i in range(N):
    for j in range(len(idxs)):
        if idxs[j] < w[i]:
            dp[i+1][j] = dp[i][j]
        else:
            try:
                dp[i+1][j] = max([dp[i][j],dp[i][idx_dict[idxs[j]-w[i]]]+v[i]])
            except:
                dp[i+1][j] = dp[i][j]
        
print(max([max(dp_) for dp_ in dp]))
Buggy python submission (verdict: Runtime Error):
n = int(input())
a_ = list(map(int, input().split(' ')))
a = [-1]
i = 0
while  i < n:
    if a[-1] != a_[i]:
        a.append(a_[i])
    i += 1
a = a[1:]

ret = 1

i = 0
while i < n-2:
    if (a[i] > a[i+1] and a[i+1] < a[i+2]) or (a[i] < a[i+1] and a[i+1] > a[i+2]):
        ret += 1
        i += 2
    else:
        i += 1
        
print(ret)

Fixed submission:

n = int(input())
a_ = list(map(int, input().split(' ')))
a = [-1]
i = 0
while  i < n:
    if a[-1] != a_[i]:
        a.append(a_[i])
    i += 1
a = a[1:]
n = len(a)

ret = 1

i = 0
while i < n-2:
    if (a[i] > a[i+1] and a[i+1] < a[i+2]) or (a[i] < a[i+1] and a[i+1] > a[i+2]):
        ret += 1
        i += 2
    else:
        i += 1
        
print(ret)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split(' ')))

ENDED = 0
FIRST = 1
UP = 2
DOWN = 3
EVEN = 4

flg = ENDED
ret = 0
bfr = None

i = 0
while i < n:
    a_ = a[i]
    if flg == ENDED:
        ret += 1
        flg = FIRST
        i += 1
    elif flg == FIRST:
        if a_ > bfr:
            flg = UP
        elif a_ == bfr:
            flg = EVEN
        elif a_ < bfr:
            flg = DOWN
        i += 1
    elif flg == UP:
        if a_ < bfr:
            flg = ENDED
        else:
            i += 1
    elif flg == EVEN:
        if a_ > bfr:
            flg = UP
        elif a_ < bfr:
            flg = DOWN
    elif flg == DOWN:
        if a_ > bfr:
            flg = ENDED
        else:
            i += 1
    
    bfr = a_
        
print(ret)

Fixed submission:

n = int(input())
a_ = list(map(int, input().split(' ')))
a = [-1]
i = 0
while  i < n:
    if a[-1] != a_[i]:
        a.append(a_[i])
    i += 1
a = a[1:]
n = len(a)

ret = 1

i = 0
while i < n-2:
    if (a[i] > a[i+1] and a[i+1] < a[i+2]) or (a[i] < a[i+1] and a[i+1] > a[i+2]):
        ret += 1
        i += 2
    else:
        i += 1
        
print(ret)
Buggy python submission (verdict: Time Limit Exceeded):
import collections

NONE_RES,A_RES,B_RES = 0,1,2
buf = [[NONE_RES,B_RES,A_RES],[A_RES,NONE_RES,B_RES],[B_RES,A_RES,NONE_RES]]

def check(s1,s2):
    s1,s2 = collections.Counter(s1),collections.Counter(s2)
    A1 = s1['A'] if 'A' in s1 else 0
    A2 = s2['A'] if 'A' in s2 else 0
    B1 = s1['B'] if 'B' in s1 else 0
    B2 = s2['B'] if 'B' in s2 else 0
    type1 = buf[A1%3][B1%3]
    type2 = buf[A2%3][B2%3]
    return type1==type2

S = input()
T = input()
n = int(input())
for _ in range(n):
    a,b,c,d = map(int,input().split(' '))
    if check(S[a-1:b],T[c-1:d]):
        print('YES')
    else:
        print('NO')

Fixed submission:
NONE_RES,A_RES,B_RES = 0,1,2
buf = [[NONE_RES,B_RES,A_RES],[A_RES,NONE_RES,B_RES],[B_RES,A_RES,NONE_RES]]

S = input()
s = [1 if c == 'A' else 0 for c in S]
T = input()
t = [1 if c == 'A' else 0 for c in T]
n = int(input())

sum_s = [0]
for s_ in s:
    sum_s.append(sum_s[-1]+s_)

sum_t = [0]
for t_ in t:
    sum_t.append(sum_t[-1]+t_)

for _ in range(n):
    a,b,c,d = map(int,input().split(' '))
    A1 = sum_s[b] - sum_s[a-1]
    B1 = (b-(a-1))-A1
    A2 = sum_t[d] - sum_t[c-1]
    B2 = (d-(c-1))-A2
    type1 = buf[A1%3][B1%3]
    type2 = buf[A2%3][B2%3]
    if type1==type2:
        print('YES')
    else:
        print('NO')
Buggy python submission (verdict: Runtime Error):
10
1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000

Fixed submission:
n = int(input())
a = list(map(int, input().split(' ')))
a = sorted(a)
ret = sum(a[n::2])
print(ret)
Buggy python submission (verdict: Runtime Error):
n,m = map(int,input().split(' '))

bar = [[] for _ in range(m)]

for i in range(n):
    a,b = map(lambda x:int(x)-1,input().split(' '))
    bar[a].append(b)
    bar[b].append(a) 


result = 0

def search(root=[0]):
    global result
    if len(root) >= n:
        result += 1
        return
    nxt = set(bar[root[-1]])
    nxt = nxt - set(root)
    for nxt_ in nxt:
        search(root+[nxt_])

search()
print(result)

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

bar = [[] for _ in range(n)]

for i in range(m):
    a,b = map(lambda x:int(x)-1,input().split(' '))
    bar[a].append(b)
    bar[b].append(a)

result = 0

def search(root=[0]):
    global result
    if len(root) >= n:
        result += 1
        return
    nxt = set(bar[root[-1]])
    nxt = nxt - set(root)
    for nxt_ in nxt:
        search(root+[nxt_])

search()
print(result)

Buggy python submission (verdict: Runtime Error):
n,m = map(int,input().split(' '))

bar = [[] for _ in range(m)]

for i in range(n):
    a,b = map(lambda x:int(x)-1,input().split(' '))
    bar[a].append(b)
    bar[b].append(a) 


result = 0

def search(root=[0]):
    global result
    if len(root) >= n:
        result += 1
    nxt = set(bar[root[-1]])
    nxt = nxt - set(root)
    for nxt_ in nxt:
        search(root+[nxt_])

search()
print(result)

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

bar = [[] for _ in range(n)]

for i in range(m):
    a,b = map(lambda x:int(x)-1,input().split(' '))
    bar[a].append(b)
    bar[b].append(a)

result = 0

def search(root=[0]):
    global result
    if len(root) >= n:
        result += 1
        return
    nxt = set(bar[root[-1]])
    nxt = nxt - set(root)
    for nxt_ in nxt:
        search(root+[nxt_])

search()
print(result)
Buggy python submission (verdict: Runtime Error):
x=input()
y=input()
z=input()
if (x*y*z=5*5*7):
    print('true')
else:
    print('False')

Fixed submission:
x,y,z=input().split()
if (float(x)*float(y)*float(z)==175):
    print('YES')
else:
    print('NO')
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
val1=input()
s=input()
n=int(val1)
count=0
for i in range(0,1000):
    a=str(i).zfill(3) #ゼロうめ
    p=0
    for j in range(0,n):
        if a[p]==s[j]:
            p+=1
            if p==3:
                count+=1
                break
print(count)

Fixed submission:
val1=input()
s=input()
n=int(val1)
count=0
for i in range(0,1000):
    a=str(i).zfill(3) #ゼロうめ
    p=0
    for j in range(0,n):
        if a[p]==s[j]:
            p+=1
            if p==3:
                count+=1
                break
print(count)

Buggy python submission (verdict: Runtime Error):
import ita
import numpy as np
val1=input()
s=input()
n=int(val1)

data=ita.array.make1d(1000)

for i in range(0,n):
    for j in range(i+1,n):
        for k in range(j+1,n):
            data[int(s[i]+s[j]+s[k])]+=1
1000-data.count(0)

Fixed submission:
val1=input()
s=input()
n=int(val1)
count=0
for i in range(0,1000):
    a=str(i).zfill(3) #ゼロうめ
    p=0
    for j in range(0,n):
        if a[p]==s[j]:
            p+=1
            if p==3:
                count+=1
                break
print(count)

Buggy python submission (verdict: Runtime Error):
import ita
import numpy as np
val1=input()
val2=input()
n=int(val1)
s=int(val2)
data=ita.array.make1d(1000)
ss=str(s)
for i in range(0,n):
    for j in range(i+1,n):
        for k in range(j+1,n):
            data[int(ss[i]+ss[j]+ss[k])]+=1
1000-data.count(0)

Fixed submission:
val1=input()
s=input()
n=int(val1)
count=0
for i in range(0,1000):
    a=str(i).zfill(3) #ゼロうめ
    p=0
    for j in range(0,n):
        if a[p]==s[j]:
            p+=1
            if p==3:
                count+=1
                break
print(count)

Buggy python submission (verdict: Runtime Error):
import ita
import numpy as np
val1=input()
val2=input()
n=int(val1)
s=int(val2)
data=ita.array.make3d(10,10,10)
ss=str(s)
for i in range(0,n):
    for j in range(i+1,n):
        for k in range(j+1,n):
            data[int(ss[i])][int(ss[j])][int(ss[k])]+=1
np.count_nonzero(data) 

Fixed submission:
val1=input()
s=input()
n=int(val1)
count=0
for i in range(0,1000):
    a=str(i).zfill(3) #ゼロうめ
    p=0
    for j in range(0,n):
        if a[p]==s[j]:
            p+=1
            if p==3:
                count+=1
                break
print(count)
Buggy python submission (verdict: Runtime Error):
a,b,c = map(int,input().split())

if a != b != c:
    print(3)
if a == b and a != c and b != c: 
    print(2)
if b == c and b != a and c != a:
    print(2)
iif a == c and a != b and c != b:
    print(2)
if a == b == c:
    print(1)

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

if a != b != c and a != c:
    print(3)
if a == b and a != c and b != c: 
    print(2)
if b == c and b != a and c != a:
    print(2)
if a == c and a != b and c != b:
    print(2)
if a == b == c:
    print(1)
Buggy python submission (verdict: Runtime Error):
s = list(map(int,input().split()))

if s[0] <= s[1]:
    print(s[0]*s[2])
else:
    atamakin = s[1]*s[2]
    nokori = (s[0]-s[1])*s[3]
    print(atamakin + nokori)

Fixed submission:
n, k, x, y = [int(input()) for i in range(4)]
if n > k:
    syogaku = k * x
    sagaku = (n - k) * y
    print(syogaku + sagaku)
else:
    syogaku = n * x
    print(syogaku)

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

if s[0] <= s[1]:
    print(s[0]*s[2])
else:
    atamakin = s[1]*s[2]
    nokori = (s[0]-s[1])*s[3]
    print(atamakin + nokori)

Fixed submission:
n, k, x, y = [int(input()) for i in range(4)]
if n > k:
    syogaku = k * x
    sagaku = (n - k) * y
    print(syogaku + sagaku)
else:
    syogaku = n * x
    print(syogaku)

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

if s[0] < s[1]:
    print(s[0]*s[2])
else:
    atamakin = s[1]*s[2]
    nokori = (s[0]-s[1])*s[3]
    print(atamakin + nokori)

Fixed submission:
n, k, x, y = [int(input()) for i in range(4)]
if n > k:
    syogaku = k * x
    sagaku = (n - k) * y
    print(syogaku + sagaku)
else:
    syogaku = n * x
    print(syogaku)
Buggy python submission (verdict: Runtime Error):
taxed_price = int(input())
raw_price = taxed_price // 1.08

if int(raw_price * 1.08) == taxed_price:
  print(raw_price)
 elif int((raw_price + 1) * 1.08) == taxed_price:
  print(raw_price + 1)
 else:
  print(':\(')


Fixed submission:
taxed_price = int(input())
raw_price = taxed_price // 1.08

if int(raw_price * 1.08) == taxed_price:
    print(int(raw_price))
elif int((raw_price + 1) * 1.08) == taxed_price:
    print(int(raw_price + 1))
else:
    print(':(')
Buggy python submission (verdict: Runtime Error):
sum = input()

if len(sum) < 2:
    print('0')
else:
    last_2_digit = sum[-2:]
    upper_digit = sum[:-2]

    if last_2_digit == '00':
        print('1')
    else:
        required_num = int(last_2_digit) // 5 + 1
        if int(upper_digit) >= required_num:
            print('1')
        else:
            print('0')


Fixed submission:
sum = input()

if len(sum) < 3:
    print('0')
else:
    last_2_digit = sum[-2:]
    upper_digit = sum[:-2]

    if last_2_digit == '00':
        print('1')
    else:
        required_num = (int(last_2_digit) - 1) // 5 + 1
        # print(upper_digit, last_2_digit, required_num)
        if int(upper_digit) >= required_num:
            print('1')
        else:
            print('0')

Buggy python submission (verdict: Runtime Error):
sum = input()
last_2_digit = sum[-2:]
upper_digit = sum[:-2]

if last_2_digit == '00':
    print('1')
else:
    required_num = int(last_2_digit) // 5 + 1
    if int(upper_digit) >= required_num:
        print('1')
    else:
        print('0')


Fixed submission:
sum = input()

if len(sum) < 3:
    print('0')
else:
    last_2_digit = sum[-2:]
    upper_digit = sum[:-2]

    if last_2_digit == '00':
        print('1')
    else:
        required_num = (int(last_2_digit) - 1) // 5 + 1
        # print(upper_digit, last_2_digit, required_num)
        if int(upper_digit) >= required_num:
            print('1')
        else:
            print('0')
Buggy python submission (verdict: Runtime Error):
input(S)
if S = Sunny:
  print("Cloudy")
elif S = Cloudy:
  print("Rainy")
else:
  print("Sunny")

Fixed submission:
S = input()
if S == "Sunny":
    A = "Cloudy"
elif S == "Cloudy":
    A = "Rainy"
else:
    A = "Sunny"
print(A)

Buggy python submission (verdict: Runtime Error):
S = input()
if S = Sunny:
  print("Cloudy")
elif S = Cloudy:
  print("Rainy")
else:
  print("Sunny")

Fixed submission:
S = input()
if S == "Sunny":
    A = "Cloudy"
elif S == "Cloudy":
    A = "Rainy"
else:
    A = "Sunny"
print(A)

Buggy python submission (verdict: Runtime Error):
W = input()
if W = "Sunny":
  print("Cloudy")
elif W = "Cloudy":
  print("Rainy")
else:
  print("Sunny")

Fixed submission:
S = input()
if S == "Sunny":
    A = "Cloudy"
elif S == "Cloudy":
    A = "Rainy"
else:
    A = "Sunny"
print(A)
Buggy python submission (verdict: Runtime Error):
a,s = input().split() 
if int(a) >= 3200:
    print(s)
else:
    print('red')

Fixed submission:
a,s = [input() for i in range(2)]
if int(a) >= 3200:
    print(s)
else:
    print('red')