Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N = str(int(input()))
total = 0
l = len(N)-1

for i in range(2**l):
    b = format(i, '0'+str(l)+'b')
    subtotal = 0
    s = N[0]

    for j in range(len(b)):
        if int(b[j]):
            subtotal += int(s)
            s = N[j+1]
        else:
            s += N[j+1]

    subtotal += int(s)
    total += subtotal

print(total)

Fixed submission:
N = str(int(input()))
total = 0
l = len(N)-1
if l == 0:
    print(N)
else:
    for i in range(2**l):
        b = format(i, '0'+str(l)+'b')
        subtotal = 0
        s = N[0]
        for j in range(len(b)):
            if int(b[j]):
                subtotal += int(s)
                s = N[j+1]
            else:
                s += N[j+1]

        subtotal += int(s)
        total += subtotal

    print(total)
Buggy python submission (verdict: Runtime Error):
s = int(input())
import sys
p = 10**9+7
dp = [0]*100#2003
dp[2]=1
if s<=3:
    print(dp[s-1])
    sys.exit()
for i in range(3,s):
    dp[i] = (dp[i-1]%p+dp[i-3]%p)%p


print(dp[s-1])

Fixed submission:
s = int(input())
import sys
p = 10**9+7
dp = [0]*2003
dp[2]=1
if s<=3:
    print(dp[s-1])
    sys.exit()
for i in range(3,s):
    dp[i] = (dp[i-1]%p+dp[i-3]%p)%p


print(dp[s-1])
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
import sys

num = 10**2 
li = [0]*num
for k in a:
    if li[k-1]==0:
        li[k-1] += 1
    else:
        if k-1!=0:
            print("not coprime")
            sys.exit()

i=2
while i<=num:
    if sum([li[k*i-1] for k in range(1,num//i+1)])>1:
        break
    i+=1
else:
    print("pairwise coprime")
    sys.exit()

import math
import functools
g = functools.reduce(math.gcd,a)
if g==1:
    print("setwise coprime")
    sys.exit()

print("not coprime")

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
import sys

num = 10**6
li = [0]*num
for k in a:
    li[k-1] += 1

i=2
while i<=num:
    if sum([li[k*i-1] for k in range(1,num//i+1)])>1:
        break
    i+=1
else:
    print("pairwise coprime")
    sys.exit()

import math
import functools
g = functools.reduce(math.gcd,a)
if g==1:
    print("setwise coprime")
    sys.exit()

print("not coprime")

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
import sys
import math
import functools
g = functools.reduce(math.gcd,a)

num = 10**2   
li = [0]*num
for k in a:
    if li[k-1]==0:
        li[k-1] += 1
    else:
        if k-1!=0:
            print("not coprime")
            sys.exit()

i=2
while i<=num:
    #print([li[k*i-1] for k in range(1,num//i+1)])
    if sum([li[k*i-1] for k in range(1,num//i+1)])>1:
        break
    i+=1
else:
    print("pairwise coprime")
    sys,exit()


if g==1:
    print("setwise coprime")
    sys.exit()

print("not coprime")
sys.exit()

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
import sys

num = 10**6
li = [0]*num
for k in a:
    li[k-1] += 1

i=2
while i<=num:
    if sum([li[k*i-1] for k in range(1,num//i+1)])>1:
        break
    i+=1
else:
    print("pairwise coprime")
    sys.exit()

import math
import functools
g = functools.reduce(math.gcd,a)
if g==1:
    print("setwise coprime")
    sys.exit()

print("not coprime")
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

for i in range(n):
    cnt = 0
    for x in range(1,int(n**0.5)):
        for y in range(1,int(n**0.5)):
            for z in range(1,int(n**0.5)):
                a = x**2 + y**2 + z**2 + x*y + y*z + z*x
                if a == i+1:
                    cnt += 1
    print(cnt)


Fixed submission:
n = int(input())
ans = [0] * n

for x in range(1,int(n**0.5)):
    for y in range(1,int(n**0.5)):
        for z in range(1,int(n**0.5)):
            a = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if a <= n:
                ans[a-1] += 1
[print(x) for x in ans]

Buggy python submission (verdict: Time Limit Exceeded):
import itertools
import math
n = int(input())

for i in range(n):
    cnt = 0
    for x,y,z in itertools.product(range(1,int(math.sqrt(n))),repeat=3):
        if x**2 + y**2 + z**2 + x*y + y*z + z*x == i+1:
            cnt += 1
    print(cnt)

Fixed submission:
n = int(input())
ans = [0] * n

for x in range(1,int(n**0.5)):
    for y in range(1,int(n**0.5)):
        for z in range(1,int(n**0.5)):
            a = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if a <= n:
                ans[a-1] += 1
[print(x) for x in ans]

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

for i in range(n):
    cnt = 0
    for x in range(1,int(math.sqrt(n))):
        for y in range(1,int(math.sqrt(n))):
            for z in range(1,int(math.sqrt(n))):
                if x**2 + y**2 + z**2 + x*y + y*z + z*x == i+1:
                    cnt += 1
    print(cnt)

Fixed submission:
n = int(input())
ans = [0] * n

for x in range(1,int(n**0.5)):
    for y in range(1,int(n**0.5)):
        for z in range(1,int(n**0.5)):
            a = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if a <= n:
                ans[a-1] += 1
[print(x) for x in ans]

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

for i in range(n):
    cnt = 0
    for x in range(1,int(math.sqrt(n))):
        for y in range(1,int(math.sqrt(n))):
            for z in range(1,int(math.sqrt(n))):
                if x**2 + y**2 + z**2 + x*y + y*z + z*x == i+1:
                    cnt += 1
    print(cnt)

Fixed submission:
n = int(input())
ans = [0] * n

for x in range(1,int(n**0.5)):
    for y in range(1,int(n**0.5)):
        for z in range(1,int(n**0.5)):
            a = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if a <= n:
                ans[a-1] += 1
[print(x) for x in ans]

Buggy python submission (verdict: Time Limit Exceeded):
import itertools
import math
n = int(input())

for i in range(n):
    cnt = 0
    for x,y,z in itertools.product(range(1,int(math.sqrt(n))),repeat=3):
        if x**2 + y**2 + z**2 + x*y + y*z + z*x == i+1:
            cnt += 1
    print(cnt)


Fixed submission:
n = int(input())
ans = [0] * n

for x in range(1,int(n**0.5)):
    for y in range(1,int(n**0.5)):
        for z in range(1,int(n**0.5)):
            a = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if a <= n:
                ans[a-1] += 1
[print(x) for x in ans]
Buggy python submission (verdict: Runtime Error):
x,y = map(int,input()split())


if i in range(x):
    if y == 4x-2a:
        print("Yes")
else:
    print("No")

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

#2a+4b =y
#a+b =x
#b=x-a
#y =2a+4(x-a)=4x-2a

for i in range(x+1):
    if y == 4*x-2*i:
        print("Yes")
        sys.exit()
else:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
import sys
n =int(input())
a = list(map(int,input().split()))
b = 1
for i in range(n):
    b *= a[i]
if b> 10**18:
    print("-1")
    sys.exit()
print(b)


Fixed submission:
import sys
n =int(input())
a = list(map(int,input().split()))
if a.count(0) >0:
    print(0)
    sys.exit()
b = 1
for i in range(n):
    b *= a[i]
    if b> 10**18:
        print("-1")
        sys.exit()
print(b)
Buggy python submission (verdict: Runtime Error):
a,b = input().split()
aa = int(a)
bb = b.replace(".","")
print(aa*bb//100)

Fixed submission:
a,b = input().split()
aa = int(a)
bb = int(b.replace(".",""))
print(aa*bb//100)
Buggy python submission (verdict: Runtime Error):
s,w = map(int,input().split())
if s <= w:
    print(unsafe)
else:
    print(safe)


Fixed submission:
s,w = map(int,input().split())
if s <= w:
    print("unsafe")
else:
    print("safe")
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int,input().split()))

for i in range(n):
    print(a.count(i+1))
    



Fixed submission:
n = int(input())
a = list(map(int,input().split()))
b = [0]*n

for i in range(n-1):
    b[a[i]-1] += 1

for i in range(n):
    print(b[i])
Buggy python submission (verdict: Time Limit Exceeded):
import math

k = int(input())

wa = 0

for a in range(1,k+1):
    for b in range(1,k+1):
        for c in range(1,k+1):
            wa += math.gcd(math.gcd(a,b),c)


print(wa)


Fixed submission:
import math
from functools import reduce
import sys
sys.setrecursionlimit(2000000)

k = int(input())

wa = 0

for a in range(1,k+1):
    for b in range(a+1,k+1):
        for c in range(b+1,k+1):
            li = [a,b,c]
            wa += reduce(math.gcd,li)*6

for a in range(1,k+1):
    for b in range(a+1,k+1):
        wa += math.gcd(a,b)*6

for a in range(1,k+1):
    wa += a
    

print(wa)

Buggy python submission (verdict: Time Limit Exceeded):
import math

k = int(input())

wa = 0

for a in range(1,k+1):
    for b in range(1,k+1):
        for c in range(1,k+1):
            wa += math.gcd(math.gcd(a,b),c)


print(wa)

Fixed submission:
import math
from functools import reduce
import sys
sys.setrecursionlimit(2000000)

k = int(input())

wa = 0

for a in range(1,k+1):
    for b in range(a+1,k+1):
        for c in range(b+1,k+1):
            li = [a,b,c]
            wa += reduce(math.gcd,li)*6

for a in range(1,k+1):
    for b in range(a+1,k+1):
        wa += math.gcd(a,b)*6

for a in range(1,k+1):
    wa += a
    

print(wa)

Buggy python submission (verdict: Runtime Error):
from functools import reduce

k = int(input())

wa = 0

for a in range(1,k+1):
    for b in range(a+1,k+1):
        for c in range(b+1,k+1):
            li = [a,b,c]
            wa += reduce(math.gcd,li)*6

for a in range(1,k+1):
    for b in range(a+1,k+1):
        wa += math.gcd(a,b)*6

for a in range(1,k+1):
    wa += a
    
print(wa)

Fixed submission:
import math
from functools import reduce
import sys
sys.setrecursionlimit(2000000)

k = int(input())

wa = 0

for a in range(1,k+1):
    for b in range(a+1,k+1):
        for c in range(b+1,k+1):
            li = [a,b,c]
            wa += reduce(math.gcd,li)*6

for a in range(1,k+1):
    for b in range(a+1,k+1):
        wa += math.gcd(a,b)*6

for a in range(1,k+1):
    wa += a
    

print(wa)

Buggy python submission (verdict: Time Limit Exceeded):
import math
from functools import reduce

k = int(input())

wa = 0

for a in range(1,k+1):
    for b in range(1,k+1):
        for c in range(1,k+1):
            li = [a,b,c]
            wa += reduce(math.gcd,li)

print(wa)



Fixed submission:
import math
from functools import reduce
import sys
sys.setrecursionlimit(2000000)

k = int(input())

wa = 0

for a in range(1,k+1):
    for b in range(a+1,k+1):
        for c in range(b+1,k+1):
            li = [a,b,c]
            wa += reduce(math.gcd,li)*6

for a in range(1,k+1):
    for b in range(a+1,k+1):
        wa += math.gcd(a,b)*6

for a in range(1,k+1):
    wa += a
    

print(wa)
Buggy python submission (verdict: Runtime Error):
n = int(input())
s = [input() for _ in range(n)]

s_sort = sorted(s)

s_num = [1]*n

for i in range(1,n):
    if s_sort[i] == s_sort[i-1]:
        s_num[i] += s_num[i-1]

Maxnum = max(s_num)

index_num = [n for n, v in enumerate(s_num) if v == Maxnum]

[print(s_sort[i]) for i in index_num,]


Fixed submission:
n = int(input())
s = [input() for _ in range(n)]

s_sort = sorted(s)

s_num = [1]*n

for i in range(1,n):
    if s_sort[i] == s_sort[i-1]:
        s_num[i] += s_num[i-1]

Maxnum = max(s_num)

index_num = [n for n, v in enumerate(s_num) if v == Maxnum]

[print(s_sort[i]) for i in index_num]
Buggy python submission (verdict: Time Limit Exceeded):
n,k = map(int,input().split())
p = list(map(int,input().split()))
walist=[]

for i in range(0,n-k+1):
    wa = 0
    for j in range(k):
        wa += p[i+j]
    walist += [wa]
print(max(walist)/2 + k/2)


Fixed submission:
n,k = map(int,input().split())
p = list(map(int,input().split()))

pp = list(map(lambda x:(x+1)/2,p))

p_rui = [pp[0]]
for i in range(1,n):
    p_rui.append(p_rui[i-1]+pp[i])



walist=[p_rui[k-1]]
for i in range(0,n-k):
    walist += [p_rui[k+i]-p_rui[i]]

print(max(walist))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
p = list(map(int,input().split()))

cnt = 1
if n==1:
    print(cnt)
else:
    for i in range(1,n):
        if min(p[:i+1])==p[i]:
            cnt +=1
    print(cnt)


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

minp =[p[0]]

for i in range(1,n):
    minp.append(min(minp[i-1],p[i]))


cnt = 0
for i in range(n):
    if minp[i] == p[i]:
        cnt += 1
print(cnt)
Buggy python submission (verdict: Runtime Error):
x,y = map(int,input().split())
import sys
sys.setrecursionlimit(10**6)



a = (2*x-y)/3
b = (2*y-x)/3
if not (a.is_integer() and  b.is_integer()):
    print(0)
    sys.exit()
a = int(a)
b = int(b)
from functools import reduce
def mycmb(n,r,p):
    r = min(r,n-r)
    if r == 0:
        return 1
    over = reduce(lambda x,y:x*y%p,range(n,n-r,-1))
    under = reduce(lambda x,y:x*y%p,range(1,r+1))
    return (over * pow(under,p-2,p))%p

mod = 10**9+7
print(mycmb(a+b,a,mod))


Fixed submission:
x,y = map(int,input().split())
import sys
sys.setrecursionlimit(10**6)



a = (2*x-y)/3
b = (2*y-x)/3
if not (a.is_integer() and  b.is_integer()) or 2*x<y or 2*y<x:
    print(0)
    sys.exit()
    
a = int(a)
b = int(b)

from functools import reduce
def mycmb(n,r,p):
    r = min(r,n-r)
    if r == 0:
        return 1
    over = reduce(lambda x,y:x*y%p,range(n,n-r,-1))
    under = reduce(lambda x,y:x*y%p,range(1,r+1))
    return (over * pow(under,p-2,p))%p

mod = 10**9+7
print(mycmb(a+b,a,mod))

Buggy python submission (verdict: Runtime Error):
x,y = map(int,input().split())
import sys

a = (2*x-y)/3
b = (2*y-x)/3
if not (a.is_integer() and  b.is_integer()):
    print(0)
    sys.exit()
a = int(a)
b = int(b)
from functools import reduce
def mycmb(n,r,p):
    r = min(r,n-r)
    if r == 0:
        return 1
    over = reduce(lambda x,y:x*y%p,range(n,n-r,-1))
    under = reduce(lambda x,y:x*y%p,range(1,r+1))
    return (over * pow(under,p-2,p))%p

mod = 10**9+7
print(mycmb(a+b,a,mod))


Fixed submission:
x,y = map(int,input().split())
import sys
sys.setrecursionlimit(10**6)



a = (2*x-y)/3
b = (2*y-x)/3
if not (a.is_integer() and  b.is_integer()) or 2*x<y or 2*y<x:
    print(0)
    sys.exit()
    
a = int(a)
b = int(b)

from functools import reduce
def mycmb(n,r,p):
    r = min(r,n-r)
    if r == 0:
        return 1
    over = reduce(lambda x,y:x*y%p,range(n,n-r,-1))
    under = reduce(lambda x,y:x*y%p,range(1,r+1))
    return (over * pow(under,p-2,p))%p

mod = 10**9+7
print(mycmb(a+b,a,mod))
Buggy python submission (verdict: Time Limit Exceeded):
n,m = map(int,input().split())
a = [int(input()) for _ in range(m)]

p = 10**9 +7
ans = [0]*(n+1)
ans[0] = 1
ans[1] = 1
for i in range(1,n):
    if i in a:
        ans[i] = 0
        ans[i+1] = ans[i-1]%p
    else:
        ans[i+1] = (ans[i-1] + ans[i])%p

print(ans[-1])


Fixed submission:
n,m = map(int,input().split())
a = [int(input()) for _ in range(m)]

p = 10**9 +7
ans = [0]*(n+1)
ans[0] = 1
ans[1] = 1

broken = [0]*(n+1)
for i in a:
    broken[i]= -1

for i in range(1,n):
    if broken[i] == -1:
        ans[i] = 0
        ans[i+1] = ans[i-1]%p
    else:
        ans[i+1] = (ans[i-1] + ans[i])%p

print(ans[-1])

Buggy python submission (verdict: Time Limit Exceeded):
n,m = map(int,input().split())
a = [int(input()) for _ in range(m)]

p = 10**9 +7
ans = [0]*(n+1)
ans[0] = 1
ans[1] = 1
for i in range(1,n):
    if i in a:
        ans[i] = 0
        ans[i+1] = ans[i-1]%p
    else:
        ans[i+1] = (ans[i-1] + ans[i])%p

print(ans[-1])


Fixed submission:
n,m = map(int,input().split())
a = [int(input()) for _ in range(m)]

p = 10**9 +7
ans = [0]*(n+1)
ans[0] = 1
ans[1] = 1

broken = [0]*(n+1)
for i in a:
    broken[i]= -1

for i in range(1,n):
    if broken[i] == -1:
        ans[i] = 0
        ans[i+1] = ans[i-1]%p
    else:
        ans[i+1] = (ans[i-1] + ans[i])%p

print(ans[-1])
Buggy python submission (verdict: Time Limit Exceeded):
n,m = map(int,input().split())
lr = [list(map(int,input().split())) for _ in range(m)]

li = [0]*n

for i in lr:
    for j in range(i[0]-1,i[1]):
        li[j] += 1
    

print(li.count(m))


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

llist = []
rlist = []
for i in range(m):
    l,r = map(int,input().split())
    llist += [l]
    rlist += [r]

print(max(0,min(rlist)-max(llist)+1))
Buggy python submission (verdict: Runtime Error):
n,m = map(int,input().split())
c = [list(map(int,input().split())) for i in range(n)]
ca = sorted(c,key=lambda x:x[0])

import sys
sys.setrecursionlimit(200000000)
if n ==1:
    print(ca[0][0]*ca[0][1])
    sys.exit()
money = 0
i = 0
num = 0
while True:
    #print(str(i)+"だよ")
    if num + ca[i][1] <= m:
        num += ca[i][1]
        money += ca[i][0] * ca[i][1]
        i += 1
        #print(num,money)
    else:
        money += ca[i][0]*(m-num)
        break    
print(money)

Fixed submission:
n,m = map(int,input().split())
c = [list(map(int,input().split())) for i in range(n)]
ca = sorted(c,key=lambda x:x[0])

import sys
if n ==1:
    print(ca[0][0]*ca[0][1])
    sys.exit()
money = 0
i = 0
num = 0
while True:
    #print(str(i)+"だよ")
    if num + ca[i][1] < m:
        num += ca[i][1]
        money += ca[i][0] * ca[i][1]
        i += 1
        #print(num,money)
    else:
        money += ca[i][0]*(m-num)
        break    
print(money)

Buggy python submission (verdict: Runtime Error):
n,m = map(int,input().split())
c = [list(map(int,input().split())) for i in range(n)]
ca = sorted(c,key=lambda x:x[0])

import sys
if n ==1:
    print(ca[0][0]*ca[0][1])
    sys.exit()
money = 0
i = 0
num = 0
while True:
    #print(str(i)+"だよ")
    if num + ca[i][1] <= m:
        num += ca[i][1]
        money += ca[i][0] * ca[i][1]
        i += 1
        #print(num,money)
    else:
        money += ca[i][0]*(m-num)
        break    
print(money)

Fixed submission:
n,m = map(int,input().split())
c = [list(map(int,input().split())) for i in range(n)]
ca = sorted(c,key=lambda x:x[0])

import sys
if n ==1:
    print(ca[0][0]*ca[0][1])
    sys.exit()
money = 0
i = 0
num = 0
while True:
    #print(str(i)+"だよ")
    if num + ca[i][1] < m:
        num += ca[i][1]
        money += ca[i][0] * ca[i][1]
        i += 1
        #print(num,money)
    else:
        money += ca[i][0]*(m-num)
        break    
print(money)
Buggy python submission (verdict: Time Limit Exceeded):
n,k = map(int,input().split())
h = list(map(int,input().split()))

dp = [float("inf")]*n
dp[0]=0
for i in range(n-1):
    for j in range(1,k+1):
        if i+j<n:
            dp[i+j] = min(dp[i+j],dp[i]+abs(h[i+j]-h[i]))
print(dp[n-1])

Fixed submission:
n,k = map(int,input().split())
h = list(map(int,input().split()))

dp = [float("inf")]*n
dp[0]=0
for i in range(n-1):
    for j in range(1,k+1):
        if i+j<n:
            dp[i+j] = min(dp[i+j],dp[i]+abs(h[i+j]-h[i]))
print(dp[n-1])
Buggy python submission (verdict: Time Limit Exceeded):
n,w = map(int,input().split())
vw = [list(map(int,input().split())) for _ in range(n)]

dp = [[0]*(w+1) for _ in range(n+1)]

for i in range(n):
    for j in range(w+1):
        if vw[i][0]>j:
            dp[i+1][j] = dp[i][j]
        else:
            dp[i+1][j] = max(dp[i][j],dp[i][j-vw[i][0]]+vw[i][1])
            #[print(*dp[l]) for l in range(n+1)]
            #print("---------------")            
print(dp[n][w])

Fixed submission:
n,w = map(int,input().split())
vw = [list(map(int,input().split())) for _ in range(n)]

dp = [[0]*(w+1) for _ in range(n+1)]

for i in range(n):
    for j in range(w+1):
        if vw[i][0]>j:
            dp[i+1][j] = dp[i][j]
        else:
            dp[i+1][j] = max(dp[i][j],dp[i][j-vw[i][0]]+vw[i][1])
            #[print(*dp[l]) for l in range(n+1)]
            #print("---------------")            
print(dp[n][w])
Buggy python submission (verdict: Runtime Error):
x = int(input())
li = [3,5,7]
if x in li:
    print('YES')
else:
    print('NO'

Fixed submission:
x = int(input())
li = [3,5,7]
if x in li:
    print('YES')
else:
    print('NO')
Buggy python submission (verdict: Runtime Error):

n,T = map(int,input().split())
ct = [list(map(int,input().split())) for _ in range(n)]
li = []
for k in ct:
    if k[1]<=T:
        li += [k[0]]
print(min(li))


Fixed submission:
n,T = map(int,input().split())
ct = [list(map(int,input().split())) for _ in range(n)]
li = []
for k in ct:
    if k[1]<=T:
        li += [k[0]]
if li ==[]:
    print("TLE")
else:
    print(min(li))
Buggy python submission (verdict: Runtime Error):
#111a
print(input().replace(1,x).replace(9.1).replace(x,9))

Fixed submission:
print(input().replace("1","x").replace("9","1").replace("x","9"))
Buggy python submission (verdict: Runtime Error):
n = int(input())
li = [int(str(i)*3) for i in range(9)]
import bisect
x = bisect.bisect_left(li,n)
print(li[x])

Fixed submission:
n = int(input())
li = [int(str(i)*3) for i in range(10)]
import bisect
x = bisect.bisect_left(li,n)
print(li[x])
Buggy python submission (verdict: Runtime Error):
n = int(input())

li = [3,5,7,11,13]
ans = 0
for i in range(1,n+1):
    cnt = 0
    for j in range(10):
        if i%li[j]==0:
            cnt += 1
    if cnt ==3:
        ans +=1

if n>=135:
    ans += 1
if n>=189:
    ans += 1

print(ans)

Fixed submission:
n = int(input())

li = [3,5,7,11,13]
ans = 0
for i in range(1,n+1):
    cnt = 0
    for j in range(5):
        if i%li[j]==0:
            cnt += 1
    if cnt ==3:
        ans +=1

if n>=135:
    ans += 1
if n>=189:
    ans += 1

print(ans)
Buggy python submission (verdict: Runtime Error):
s = input()
sc = s.index("C")
if s[0]=="A" and s[2:-1].count("C")==1 and (s[1:sc]+s[sc+1:]).islower():
    print("AC")
else:
    print("WA")

Fixed submission:
s = input()
if s[0]=="A" and s[2:-1].count("C")==1:
    sc = s.index("C")
    if (s[1:sc]+s[sc+1:]).islower():
        print("AC")
    else:
        print("WA")
else:
    print("WA")
Buggy python submission (verdict: Runtime Error):
li = sorted([a[i]-(i+1) for i in range(n)])
if n%2==0:
    ave = (li[n//2]+li[n//2-1])//2
else:
    ave = li[(n-1)//2]

import math
ave1 = math.floor(ave)
ave2 = math.ceil(ave)

ll = []
c = 0
for i in range(n):
    c += abs(a[i]-(ave1+i+1))
else:
    ll += [c]

c =0
for i in range(n):
    c += abs(a[i]-(ave2+i+1))
else:
    ll += [c]

print(min(ll))

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

li = sorted([a[i]-(i+1) for i in range(n)])
if n%2==0:
    ave = (li[n//2]+li[n//2-1])//2
else:
    ave = li[(n-1)//2]

import math
ave1 = math.floor(ave)
ave2 = math.ceil(ave)

ll = []
c = 0
for i in range(n):
    c += abs(a[i]-(ave1+i+1))
else:
    ll += [c]

c =0
for i in range(n):
    c += abs(a[i]-(ave2+i+1))
else:
    ll += [c]

print(min(ll))