Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
l, r = map(int, input().split())
la = l % 2019
ra = r % 2019
diff = ra - la
if diff <= 0:
  diff+=2019
ans = None
for i in range(la, la+diff):
  for j in range(i+1, la+diff+1):
    mul = (i*j) % 2019
    if mul < ans:
      ans = mul
print(ans)


Fixed submission:
l, r = map(int, input().split())
if r-l >=2019:
  print("0")
  exit()
la = l % 2019
ra = r % 2019
diff = ra - la
if diff <= 0:
  print("0")
  exit()
ans = 2019
for i in range(la, ra):
  for j in range(i+1, ra+1):
    mul = (i*j) % 2019
    if mul <= ans:
      ans = mul
print(int(ans))
Buggy python submission (verdict: Runtime Error):
import sys
s = input()
a = s[0]
if s.count(a) != 2:
  print("No")
  sys.exit()
s.replace(a)
b = s[0]
if s.count(b) != 2:
  print("No")
  sys.exit()
print("Yes")


Fixed submission:
import sys
s = input()
a = s[0]
if s.count(a) != 2:
  print("No")
  sys.exit()
t = s.replace(a,"")

if t[0] != t[1]:
  print("No")
else:
  print("Yes")

Buggy python submission (verdict: Runtime Error):
s = input()
a = s[0]
if s.count(a) != 2:
  print("No")
  sys.exit()
s.strip(a)
b = s[0]
if s.count(b) != 2:
  print("No")
  sys.exit()
print("Yes")


Fixed submission:
import sys
s = input()
a = s[0]
if s.count(a) != 2:
  print("No")
  sys.exit()
t = s.replace(a,"")

if t[0] != t[1]:
  print("No")
else:
  print("Yes")

Buggy python submission (verdict: Runtime Error):
s = input()
a = s[0]
if s.count(a) != 2:
  print("No")
  sys.exit()
s.remove(a)
s.remove(a)
b = s[0]
if s.count(b) != 2:
  print("No")
  sys.exit()
print("Yes")

Fixed submission:
import sys
s = input()
a = s[0]
if s.count(a) != 2:
  print("No")
  sys.exit()
t = s.replace(a,"")

if t[0] != t[1]:
  print("No")
else:
  print("Yes")
Buggy python submission (verdict: Runtime Error):

N = int(input())
S=[0]*N
P=[0]*N 
for i in range(N):
    S[i], P[i] = input().split()
    P[i] = int(P[i])

S_mid = sorted(S, key=lambda idx: P[idx] )
fin = sorted(range(N), key=lambda idx: S_mid[idx])
for i in fin:
    print (i)

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

Buggy python submission (verdict: Runtime Error):
A, P = input().split()
P += A*3
pi = int(P/3)
print (pi)

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

Buggy python submission (verdict: Runtime Error):
A, P = raw_input().split()
P += A*3
pi = int(P/3)
print (pi)

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

Buggy python submission (verdict: Runtime Error):
A, P = input()
P += A*3
pi = int(P/3)
print (pi)

Fixed submission:
A, P = map(int, input().split())
P += A*3
pi = int(P/2)
print (pi)
Buggy python submission (verdict: Runtime Error):
N = int(input())
sp=[[0]*3 for i in range(N)]
for i in range(N):
    sp[i][0], sp[i][1] = input.split()
    sp[i][1] = int(sp[i][1])
    sp[i][2] = i

sp = sorted(sp, key=lambda x:x[1])
sp = sorted(sp, key=lambda x:x[0])
for i in sp:
    print (i[2])


Fixed submission:
N = int(input())
sp=[[0]*3 for i in range(N)]
for i in range(N):
    sp[i][0], sp[i][1] = input().split()
    sp[i][1] = int(sp[i][1])
    sp[i][2] = i+1

sp = sorted(sp, key=lambda x:x[1], reverse=True)
sp = sorted(sp, key=lambda x:x[0])
for i in sp:
    print (i[2])

Buggy python submission (verdict: Runtime Error):
N = int(input())
S=[0]*N
P=[0]*N 
for i in range(N):
    S[i], P[i] = input().split()
    P[i] = int(P[i])

S_mid = sorted(S, key=lambda x:P[x])
S_fin = sorted(range(len(S_mid)), key=lambda idx:S_mid[idx])
# fin = sorted(range(N), key=lambda idx: S_mid[idx])
for i in fin:
    print (i)

Fixed submission:
N = int(input())
sp=[[0]*3 for i in range(N)]
for i in range(N):
    sp[i][0], sp[i][1] = input().split()
    sp[i][1] = int(sp[i][1])
    sp[i][2] = i+1

sp = sorted(sp, key=lambda x:x[1], reverse=True)
sp = sorted(sp, key=lambda x:x[0])
for i in sp:
    print (i[2])

Buggy python submission (verdict: Runtime Error):

N = int(input())
S=[0]*N
P=[0]*N 
for i in range(N):
    S[i], P[i] = input().split()
    P[i] = int(P[i])

S_mid = sorted(S, key=lambda idx: P[idx] )
fin = sorted(range(N), key=lambda idx: S_mid[idx])
for i in fin:
print (i)

Fixed submission:
N = int(input())
sp=[[0]*3 for i in range(N)]
for i in range(N):
    sp[i][0], sp[i][1] = input().split()
    sp[i][1] = int(sp[i][1])
    sp[i][2] = i+1

sp = sorted(sp, key=lambda x:x[1], reverse=True)
sp = sorted(sp, key=lambda x:x[0])
for i in sp:
    print (i[2])
Buggy python submission (verdict: Runtime Error):
n, m, x = map(int, input().split())
a = list(map(int, input().split()))
print(min(sum(a[:a.index(x)+1]), sum(a[a.index(x)+1:])))


Fixed submission:
n, m, x = map(int, input().split())
a = list(map(int, input().split()))
for i,j in enumerate(a):
  if j > x:
    cnt = i
    break
print(min(cnt, m-cnt))
Buggy python submission (verdict: Runtime Error):
import sys

n, k = map(int, raw_input().split())
ans = k # first                                                                                                 
if n = 1 and k = 1:
    print ans
    sys.exit()
for i in range(n-1):
    ans *= k-1
print ans


Fixed submission:
import sys

n, k = map(int, raw_input().split())
ans = k # first                                                                                                 
if n == 1 and k == 1:
    print ans
    sys.exit()
for i in range(n-1):
    ans *= k-1
print ans

Buggy python submission (verdict: Runtime Error):
import sys

n, k = map(int, raw_input().split())
ans = k # first                                                                                                 
if n = 1 and k = 1:
    print ans
    sys.exit()
for i in range(n-1):
    ans *= k-1



Fixed submission:
import sys

n, k = map(int, raw_input().split())
ans = k # first                                                                                                 
if n == 1 and k == 1:
    print ans
    sys.exit()
for i in range(n-1):
    ans *= k-1
print ans
Buggy python submission (verdict: Runtime Error):
s = raw_input()

c = "CODEFESTIVAL2016"

ans  = 0
for i in range(len(c)):
    if s[i] != c[[i]:
                 ans += 1
print ans


Fixed submission:
s = raw_input()

c = "CODEFESTIVAL2016"

ans  = 0
for i in range(len(c)):
    if s[i] != c[i]:
        ans += 1
print ans
Buggy python submission (verdict: Time Limit Exceeded):
import sys
import os
import itertools
import numpy as np
from collections import deque

def main():
    if os.getenv("ENV")=='LOCAL':
        sys.stdin = open(os.path.dirname(__file__)+'/input.txt', 'r')

    N=int(input())

    # divisors=sieve(N)
    #
    # # print(divisors)
    # sum=0
    # for i,n in enumerate(divisors):
    #     sum+=i*n

    # print(5*(2+5-1)//2)
    print(sieve(N))

def sieve(n):
    # is_prime = [i for i in range(n+1)]
    sum=n*(2+n-1)//2

    for i in range(2, n+1):
        # print(is_prime)
        sum += i
        j = 2 * i
        while j <= n:
            sum += j
            j += i

    return sum


if __name__ == '__main__':
    main()


Fixed submission:
import sys
import os
import itertools
import numpy as np
from collections import deque

def main():
    if os.getenv("ENV")=='LOCAL':
        sys.stdin = open(os.path.dirname(__file__)+'/input.txt', 'r')

    N=int(input())

    # divisors=sieve(N)
    #
    # # print(divisors)
    # sum=0
    # for i,n in enumerate(divisors):
    #     sum+=i*n

    # print(5*(2+5-1)//2)
    print(sieve(N))

def sieve(n):
    # is_prime = [i for i in range(n+1)]
    sum=n*(2+n-1)//2
    # sum=0

    for i in range(2, n+1):
        # print(is_prime)
        d=n//i
        # print(d)
        sum+=d*((d+1)*i)//2
        # sum += i
        # j = 2 * i
        # while j <= n:
        #     sum += j
        #     j += i

    return sum


if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import sys
import os
import itertools
import numpy as np
from collections import deque

def main():
    if os.getenv("ENV")=='LOCAL':
        sys.stdin = open(os.path.dirname(__file__)+'/input.txt', 'r')

    N=int(input())

    divisors=sieve(N)

    # print(divisors)
    sum=0
    for i,n in enumerate(divisors):
        sum+=i*n

    print(sum)

def sieve(n):
    is_prime = [1 for _ in range(n+1)]

    for i in range(2, n+1):
        # print(is_prime)
        is_prime[i] += 1
        j = 2 * i
        while j <= n:
            is_prime[j] += 1
            j += i

    return is_prime


if __name__ == '__main__':
    main()


Fixed submission:
import sys
import os
import itertools
import numpy as np
from collections import deque

def main():
    if os.getenv("ENV")=='LOCAL':
        sys.stdin = open(os.path.dirname(__file__)+'/input.txt', 'r')

    N=int(input())

    # divisors=sieve(N)
    #
    # # print(divisors)
    # sum=0
    # for i,n in enumerate(divisors):
    #     sum+=i*n

    # print(5*(2+5-1)//2)
    print(sieve(N))

def sieve(n):
    # is_prime = [i for i in range(n+1)]
    sum=n*(2+n-1)//2
    # sum=0

    for i in range(2, n+1):
        # print(is_prime)
        d=n//i
        # print(d)
        sum+=d*((d+1)*i)//2
        # sum += i
        # j = 2 * i
        # while j <= n:
        #     sum += j
        #     j += i

    return sum


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
import sys
import os
import itertools
from collections import deque

def main():
    if os.getenv("ENV")=='LOCAL':
        sys.stdin = open(os.path.dirname(__file__)+'/input.txt', 'r')

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

    ans=0
    # for i in range(N):
    #     for j in range(N):
    #         if i != j and A[i]%A[j]==0:
    #             break
    #         elif j==N-1:
    #             ans+=1

    for i,a in enumerate(A):
        a_set=set(make_divisors(a))
        if a_set.isdisjoint(set(A[:i])|set(A[i+1:])):
            ans+=1

    print(ans)

def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

if __name__ == '__main__':
    main()


Fixed submission:
import sys
import os
import itertools
from collections import deque

def main():
    if os.getenv("ENV")=='LOCAL':
        sys.stdin = open(os.path.dirname(__file__)+'/input.txt', 'r')

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

    A.sort()
    ans=0
    # print(A)

    T=[True]*A[-1]
    # T[0]=False

    for i,a in enumerate(A):
        if T[a-1]:
            j=2*a
            while j <= A[-1]:
                T[j-1]=False
                j+=a
            if not i+1==len(A):
                if A[i]==A[i+1]:
                    T[a-1]=False

    for a in A:
        if T[a-1]:
            ans+=1

    print(ans)

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import sys
import os
import itertools
from collections import deque

def main():
    if os.getenv("ENV")=='LOCAL':
        sys.stdin = open(os.path.dirname(__file__)+'/input.txt', 'r')

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

    ans=0
    for i in range(N):
        for j in range(N):
            if i != j and A[i]%A[j]==0:
                break
            elif j==N-1:
                ans+=1

    print(ans)


if __name__ == '__main__':
    main()


Fixed submission:
import sys
import os
import itertools
from collections import deque

def main():
    if os.getenv("ENV")=='LOCAL':
        sys.stdin = open(os.path.dirname(__file__)+'/input.txt', 'r')

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

    A.sort()
    ans=0
    # print(A)

    T=[True]*A[-1]
    # T[0]=False

    for i,a in enumerate(A):
        if T[a-1]:
            j=2*a
            while j <= A[-1]:
                T[j-1]=False
                j+=a
            if not i+1==len(A):
                if A[i]==A[i+1]:
                    T[a-1]=False

    for a in A:
        if T[a-1]:
            ans+=1

    print(ans)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
import sys
import os

def file_input():
    f = open('ABC167/input.txt', 'r')
    sys.stdin = f

def main():
    #file_input()
    # int(input())
    A,B,C,K=map(int, input().split())

    sum=0
    for i in range(K):
        if A!=0:
            A-=1
            sum+=1
        elif B!=0:
            B-=1
        elif C!=0:
            C-=1
            sum-=1
    print(sum)

if __name__ == '__main__':
    main()


Fixed submission:
import sys
import os

def file_input():
    f = open('ABC167/input.txt', 'r')
    sys.stdin = f

def main():
    #file_input()
    # int(input())
    A,B,C,K=map(int, input().split())

    sum=0
    if K>A:
        sum+=A
        K-=A
        if K>B:
            K-=B
            sum-=K        
    else:
        sum+=K

    print(sum)

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
import sys
import os

def file_input():
    f = open('/input.txt', 'r')
    sys.stdin = f

def main():
    # file_input()
    # int(input())
    A,B,C,K=int(map(int, input().split()))

    sum=0
    for i in K:
        if A!=0:
            A-=1
            sum+=1
        elif B!=0:
            B-=1
        elif C!=0:
            C-=1
            sum-=1
    print(sum)

if __name__ == '__main__':
    main()


Fixed submission:
import sys
import os

def file_input():
    f = open('ABC167/input.txt', 'r')
    sys.stdin = f

def main():
    #file_input()
    # int(input())
    A,B,C,K=map(int, input().split())

    sum=0
    if K>A:
        sum+=A
        K-=A
        if K>B:
            K-=B
            sum-=K        
    else:
        sum+=K

    print(sum)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
import sys
import os

def file_input():
    f = open('ABC167/input.txt', 'r')
    sys.stdin = f

def comb(n,k):
    nCk = 1
    MOD = 998244353

    for i in range(n-k+1, n+1):
        nCk *= i
        nCk %= MOD

    for i in range(1,k+1):
        nCk *= pow(i,MOD-2,MOD)
        nCk %= MOD
    return nCk

def main():
   # file_input()
    N,M,K=map(int, input().split())

    mod=998244353
    ans=0
    for k in range(K+1):
        ans+=M*comb(N-1,k)*pow(M-1,N-1-k,mod)

    print(ans%mod)

if __name__ == '__main__':
    main()


Fixed submission:
import sys
import os

def file_input():
    f = open('ABC167/input.txt', 'r')
    sys.stdin = f

fact = [1, 1]
factinv = [1, 1]
inv = [0, 1]

def init_cmb(N,p):
    for i in range(2, N + 1):
        fact.append((fact[-1] * i) % p)
        inv.append((-inv[p % i] * (p // i)) % p)
        factinv.append((factinv[-1] * inv[-1]) % p)

def cmb(n, r, p):
    if (r < 0) or (n < r):
        return 0
    r = min(r, n - r)
    return fact[n] * factinv[r] * factinv[n-r] % p

def main():
    #file_input()
    N,M,K=map(int, input().split())

    mod=998244353
    ans=0

    init_cmb(N,mod)
    for k in range(K+1):
        ans+=M*cmb(N-1,k,mod)*pow(M-1,N-1-k,mod)

    print(ans%mod)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
import sys
import os

def file_input():
    f = open('../Beginner_Contest_164/input.txt', 'r')
    sys.stdin = f

def main():
    #file_input()
    # A,B,C,D=map(int, input().split())
    N = int(input())

    S = []
    for i in range(N):
        str = input()
        if str not in S:
            S.append(str)

    print(len(S))

if __name__ == '__main__':
    main()


Fixed submission:
import sys
import os

def file_input():
    f = open('../Beginner_Contest_164/input.txt', 'r')
    sys.stdin = f

def main():
    #file_input()
    # A,B,C,D=map(int, input().split())
    N = int(input())

    # S = []
    # for i in range(N):
    #     str = input()
    #     if str not in S:
    #         S.append(str)
    #
    # print(len(S))

    S = set()
    for i in range(N):
        S.add(input())

    print(len(S))

    # S = {}
    # val=0
    # for i in range(N):
    #     str = input()
    #     if S.get(str) == None:
    #         S[val]=str
    #         val+=1
    #
    # print(val)

    # val = 0
    # str = ""
    # for i in range(N):
    #     in_str = input()
    #     if str.find(in_str):
    #         str += " "+in_str
    #         val += 1
    #
    # print(val)

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import sys
import os

def file_input():
    f = open('../Beginner_Contest_164/input.txt', 'r')
    sys.stdin = f

def main():
    #file_input()
    # A,B,C,D=map(int, input().split())
    N = int(input())

    S = []
    val = 0
    for i in range(N):
        str = input()
        if str not in S:
            val += 1
            S.append(str)

    print(val)

if __name__ == '__main__':
    main()


Fixed submission:
import sys
import os

def file_input():
    f = open('../Beginner_Contest_164/input.txt', 'r')
    sys.stdin = f

def main():
    #file_input()
    # A,B,C,D=map(int, input().split())
    N = int(input())

    # S = []
    # for i in range(N):
    #     str = input()
    #     if str not in S:
    #         S.append(str)
    #
    # print(len(S))

    S = set()
    for i in range(N):
        S.add(input())

    print(len(S))

    # S = {}
    # val=0
    # for i in range(N):
    #     str = input()
    #     if S.get(str) == None:
    #         S[val]=str
    #         val+=1
    #
    # print(val)

    # val = 0
    # str = ""
    # for i in range(N):
    #     in_str = input()
    #     if str.find(in_str):
    #         str += " "+in_str
    #         val += 1
    #
    # print(val)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
import sys
import os
import math

def file_input():
    f = open('input.txt', 'r')
    sys.stdin = f

def main():
    #file_input()

    N = [0]*int(input())
    A = list(map(int, input().split()))

    for i in A:
        N[i-1]+=1

    for i in N:
        print(i)


if __name__ == '__main__':
    main()


Fixed submission:
import math


def main():

    R = int(input())
    print(R*2*math.pi)


if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
def main():

    N = [0]*int(input())
    A = list(map(int, input().split()))

    for i in A:
        N[i-1]+=1

    for i in N:
        print(i)


if __name__ == '__main__':
    main()


Fixed submission:
import math


def main():

    R = int(input())
    print(R*2*math.pi)


if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
import sys
import os
import math

def file_input():
    f = open('input.txt', 'r')
    sys.stdin = f

def main():
    #file_input()

    N = [0]*int(input())
    A = list(map(int, input().split()))

    for i in A:
        N[i-1]+=1

    for i in N:
        print(i)


if __name__ == '__main__':
    main()


Fixed submission:
import math


def main():

    R = int(input())
    print(R*2*math.pi)


if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
import sys
import os
import math

def file_input():
    f = open('input.txt', 'r')
    sys.stdin = f

def main():
   # file_input()

    N = [0]*int(input())
    A = list(map(int, input().split()))

    for i in A:
        N[i-1]+=1

    for i in N:
        print(i)


if __name__ == '__main__':
    main()


Fixed submission:
import math


def main():

    R = int(input())
    print(R*2*math.pi)


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
import sys
import os
import math

def file_input():
    f = open('input.txt', 'r')
    sys.stdin = f

def main():
    file_input()

    N = [0]*int(input())
    A = list(map(int, input().split()))

    for i in A:
        N[i-1]+=1

    for i in N:
        print(i)


if __name__ == '__main__':
    main()


Fixed submission:
import sys
import os
import math

def file_input():
    f = open('input.txt', 'r')
    sys.stdin = f

def main():
    #file_input()

    j = int(input())
    N = [0]*j
    A = list(map(int, input().split()))

    for i in A:
        N[i-1]+=1

    for i in N:
        print(i)


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
import sys
import os

def file_input():
    f = open('Beginner_Contest_162/input.txt', 'r')
    sys.stdin = f

def main():
    #file_input()
    N=input()
    S=input()
    # print(S)

    sum=0
    for i in range(len(S)):
        # print(i)
        for j in range(i+1,len(S)):
            if S[i]!=S[j]:
                for k in range(j+1,len(S)):
                    if S[j]!=S[k] and S[k]!=S[i] and j-i!=k-j:
                        sum+=1
                        # print(S[i]+S[j]+S[k])
    print(sum)

if __name__ == '__main__':
    main()


Fixed submission:
import sys
import os

def file_input():
    f = open('Beginner_Contest_162/input.txt', 'r')
    sys.stdin = f

def main():
    #file_input()
    N=int(input())
    S=input()
    # print(S)
    R=S.count('R')
    G=S.count('G')
    B=S.count('B')

    sum=R*G*B
    # print(sum)
    for i in range(N-2):
        # print(i)
        for j in range(i+1,-(-(N+i)//2)):
            k=2*j-i
            # print("i:"+str(i)+" j:"+str(j)+" k:"+str(k))
            if S[i]!=S[j] and S[j]!=S[k] and S[k]!=S[i]:
                sum-=1
                # print(S[i]+S[j]+S[k])


    print(sum)

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import sys
import os

def file_input():
    f = open('Beginner_Contest_162/input.txt', 'r')
    sys.stdin = f

def main():
    #file_input()
    N=input()
    S=input()
    # print(S)

    sum=0
    for i in range(len(S)):
        # print(i)
        for j in range(i+1,len(S)):
            if S[i]!=S[j]:
                for k in range(j+1,len(S)):
                    if S[i]!=S[j] and S[j]!=S[k] and S[k]!=S[i] and j-i!=k-j:
                        sum+=1
                        # print(S[i]+S[j]+S[k])
    print(sum)

if __name__ == '__main__':
    main()


Fixed submission:
import sys
import os

def file_input():
    f = open('Beginner_Contest_162/input.txt', 'r')
    sys.stdin = f

def main():
    #file_input()
    N=int(input())
    S=input()
    # print(S)
    R=S.count('R')
    G=S.count('G')
    B=S.count('B')

    sum=R*G*B
    # print(sum)
    for i in range(N-2):
        # print(i)
        for j in range(i+1,-(-(N+i)//2)):
            k=2*j-i
            # print("i:"+str(i)+" j:"+str(j)+" k:"+str(k))
            if S[i]!=S[j] and S[j]!=S[k] and S[k]!=S[i]:
                sum-=1
                # print(S[i]+S[j]+S[k])


    print(sum)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
import sys
import os

def file_input():
    f = open('ARC099/input.txt', 'r')
    sys.stdin = f

def main():
    #file_input()
    # int(input())
    N,K=map(int, input().split())
    A_li=list(map(int, input().split()))
    # print(min)

    print(-(-N//(K-1))

if __name__ == '__main__':
    main()


Fixed submission:
import sys
import os

def file_input():
    f = open('ARC099/input.txt', 'r')
    sys.stdin = f

def main():
    #file_input()
    # int(input())
    N,K=map(int, input().split())
    A_li=list(map(int, input().split()))
    # print(min)

    print(-(-(N-K)//(K-1))+1)

if __name__ == '__main__':
    main()