Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N, M = list(map(int, input().split()))
ab = {i:[] for i in range(N)}
for _ in range(M):
    a, b = list(map(int, input().split()))
    ab[a-1].append(b-1)
    ab[b-1].append(a-1)
    
cand = [[0]+[one] for one in ab[0]]
while len(cand)>0:
    tmp_cand = []
    for c in cand:
        last = c[-1]
        n = []
        for nc in ab[last]:
            if nc not in c:
                n.append(c+[nc])
        tmp_cand.extend(n)
    cand = tmp_cand
    if len(cand[0])==N:
        break
print(len(cand))

Fixed submission:
N, M = list(map(int, input().split()))
ab = {i:[] for i in range(N)}
for _ in range(M):
    a, b = list(map(int, input().split()))
    ab[a-1].append(b-1)
    ab[b-1].append(a-1)
    
cand = [[0]+[one] for one in ab[0]]
while len(cand)>0 and len(cand[0])<N:
    tmp_cand = []
    for c in cand:
        last = c[-1]
        n = []
        for nc in ab[last]:
            if nc not in c:
                n.append(c+[nc])
        tmp_cand.extend(n)
    cand = tmp_cand
print(len(cand))
Buggy python submission (verdict: Runtime Error):
from math import *

def lcm(a, b):
    return a * b // gcd(a, b)

n = int(input())
a = input().split()

for i in range(n):
    a[i] = int(a[i])

l = 1
for i in range(n):
    l = lcm(l, a[i])

l -= 1
s = 0

for i in range(n):
    s += l % a[i]

print(s)

Fixed submission:
n = int(input())
a = input().split()
s = 0
for i in range(n):
    s += int(a[i])
print(s - n)
Buggy python submission (verdict: Runtime Error):
a=input()
b=input()
c=input()
if(a==b and a == c):
  print("No")
elif(a != b and b == c):
  print("Yes")
elif(a != b and a == c):
  print("Yes")
elif(a!=c and a == b):
  print("Yes")
else:
  print("No")

Fixed submission:
a=input()
b=a[2]
c=a[4]
a=a[0]
if(a==b and a == c):
  print("No")
elif(a != b and b == c):
  print("Yes")
elif(a != b and a == c):
  print("Yes")
elif(a!=c and a == b):
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
def main():
    from collections import Counter
    n, *i = map(int, open(0).read().split())
    a = i[:n]
    _ = i[n]
    d = Counter(a)
    s = sum(k * v for k, v in d.items())
    ans = []
    for b, c in zip(*[iter(i[n + 1:])] * 2):
        v, w = d.get(b), d.get(c)
        if v is not None:
            s += (c - b) * v
        ans.append(s)
        d[c] = v if w is None else v + w

    print(*ans, sep="\n")


if __name__ == '__main__':
    main()


Fixed submission:
def main():
    n, *i = map(int, open(0).read().split())
    a = i[:n]
    _ = i[n]
    s = sum(a)

    m = [0] * (10 ** 5 + 1)
    for x in a:
        m[x] += 1

    ans = []
    for b, c in zip(*[iter(i[n + 1:])] * 2):
        m[c] += m[b]
        s += (c - b) * m[b]
        m[b] = 0
        ans.append(s)

    print(*ans, sep="\n")


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
def main():
    n, *a = map(int, open(0).read().split())
    if n == 1:
        print(1)
        return

    m = max(a) + 1
    l = [0] * m
    for i in a:
        for j in range(i, m, i):
            l[j] += 2
        l[i] -= 1

    ans = sum(a[i] == -1 for i in a)
    print(ans)


if __name__ == "__main__":
    main()


Fixed submission:
def main():
    n, *a = map(int, open(0).read().split())
    if n == 1:
        print(1)
        return

    m = max(a) + 1
    l = [0] * m
    for i in a:
        for j in range(i, m, i):
            l[j] += 2
        l[i] -= 1

    ans = l.count(1)
    print(ans)


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
def main():
    from collections import Counter
    n, *a = map(int, open(0).read().split())
    x = Counter(a)

    y = [k for k, v in x.items() if v == 1]
    if len(y) == 0:
        print(0)
        exit()

    z = sorted(y)

    if x.get(1) > 1:
        print(0)
        exit()
    if x.get(1) == 1:
        print(1)
        exit()

    l = z[-1]
    m = [0] * (l + 1)
    for i in z:
        if m[i] == 0:
            m[i] = 1
        j = l // i
        for k in range(2, j + 1):
            m[i * k] = -1

    ans = m.count(1)
    print(ans)


if __name__ == '__main__':
    main()


Fixed submission:
def main():
    n, *a = map(int, open(0).read().split())
    if n == 1:
        print(1)
        return

    m = max(a) + 1
    l = [0] * m
    for i in a:
        for j in range(i, m, i):
            l[j] += 2
        l[i] -= 1

    ans = l.count(1)
    print(ans)


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    from operator import mul
    from functools import reduce
    n, *a = map(int, open(0).read().split())
    b = reduce(mul, a)
    if b > 10 ** 18:
        print(-1)
    else:
        print(b)


if __name__ == '__main__':
    main()


Fixed submission:
def main():
    n, *a = map(int, open(0).read().split())
    ans = 1
    if a.count(0):
        print(0)
        exit()
    for i in a:
        ans *= i
        if ans > 10 ** 18:
            print(-1)
            break
    else:
        print(ans)


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
def main():
    x = int(input())

    i = 0
    while True:
        j = i ** 5
        a1, a2 = x + j, x - j

        p = a1 ** (1 / 5)
        if int(p) == p:
            p = int(p)
            print(p, j)
            break
        if a2 >= 0:
            p = a2 ** (1 / 5)
            if int(p) == p:
                p = int(p)
                print(p, -1 * j)
                break
        else:
            p = abs(b2) ** (1 / 5) * -1
            if int(p) == p:
                p = int(p)
                print(p, -1 * j)
                break
        i += 1


if __name__ == '__main__':
    main()


Fixed submission:
def main():
    x = int(input())
    for i in range(150, 0, -1):
        for j in range(i, -150, -1):
            cal = i ** 5 - j ** 5
            if cal == x:
                print(i, j)
                exit()


if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    x = int(input())
    n = int(x ** (1 / 5))
    a = n
    b = n
    while True:
        if a**5 - b**5 == x:
            print(a,b)
            break
        b -= 1

if __name__ == '__main__':
    main()


Fixed submission:
def main():
    x = int(input())
    for i in range(150, 0, -1):
        for j in range(i, -150, -1):
            cal = i ** 5 - j ** 5
            if cal == x:
                print(i, j)
                exit()


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
def main():
    from itertools import groupby
    n, k, c = map(int, input().split())
    s = list(input())

    if c == 0:
        if s.count('o') == k:
            ans = '\n'.join(map(str,range(1,n+1)))
            print(ans)
            return
        else:
            return

       check_f = []
    x = 0
    for i, j in enumerate(s, 1):
        if x:
            x -= 1
            continue
        if j == 'o':
            x = c
            check_f.append(i)
        if len(check_f) == k:
            break

    check_b = []
    x = 0
    for i, j in enumerate(s[::-1]):
        if x:
            x -= 1
            continue
        if j == 'o':
            x = c
            check_b.append(n - i)
        if len(check_b) == k:
            break

    ans = list(set(check_f) & set(check_b))
    ans.sort()
    ans = '\n'.join(map(str,ans))
    print(ans)

if __name__ == '__main__':
    main()


Fixed submission:
def main():
    from itertools import groupby
    n, k, c = map(int, input().split())
    s = list(input())

    if c == 0:
        a = [i + 1 for i, c in enumerate(s) if c == 'o']
        if len(a) == k:
            print(*a, sep='\n')
        else:
            print()
        exit()

    check_f = []
    x = 0
    for i, j in enumerate(s, 1):
        if x:
            x -= 1
            continue
        if j == 'o':
            x = c
            check_f.append(i)
        if len(check_f) == k:
            break

    check_b = []
    x = 0
    for i, j in enumerate(s[::-1]):
        if x:
            x -= 1
            continue
        if j == 'o':
            x = c
            check_b.append(n - i)
        if len(check_b) == k:
            break

    ans = list(set(check_f) & set(check_b))
    ans.sort()
    ans = '\n'.join(map(str, ans))
    print(ans)


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
def warshal_floyd(m, n):
    for k in range(n):
        for i in range(n):
            for j in range(n):
                c_ij = m[i][j]
                c_ikj = m[i][k] + m[k][j]
                m[i][j] = min(c_ij, c_ikj)
    return m


def main():
    from collections import Counter
    n, x, y = map(int, input().split())
    m = [[float("Inf")] * n for _ in range(n)]
    for i in range(n):
        m[i][i] = 0
    for i in range(n - 1):
        m[i][i + 1] = 1
        m[i + 1][i] = 1

    m[x - 1][y - 1] = 1
    m[y - 1][x - 1] = 1

    wm = warshal_floyd(m, n)

    mm = sum(m, [])
    c = Counter(mm)
    ans = ''
    for i in range(1, n):
        d = c.get(i)
        if d is None:
            ans += "0\n"
        else:
            ans += str(d // 2) + '\n'
    print(ans)


if __name__ == '__main__':
    main()


Fixed submission:
def main():
    n, x, y = map(int, input().split())
    m = [0] * (n - 1)
    for i in range(1, n):
        for j in range(i + 1, n + 1):
            p = min([abs(i - j), abs(x - i) + 1 + abs(j - y), abs(y - i) + 1 + abs(j - x)])
            m[p - 1] += 1

    ans = "\n".join(map(str, m))
    print(ans)


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
def main():
    from decimal import Decimal

    a,b,c = map(int, input().split())
    a,b,c = Decimal(a) ,Decimal(b), Decimal(c)
    f = a**.5 + b**.5 < c**.5
    print("Yes" if f else "No")

if __name__ == '__main__':
    main()


Fixed submission:
def main():
    from decimal import Decimal

    a,b,c = map(int, input().split())
    a,b,c = Decimal(a) ,Decimal(b), Decimal(c)
    f = a.sqrt() + b.sqrt() < c.sqrt()
    print("Yes" if f else "No")

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
def main():
  s,q,*r = [list(k.split()) for k in open(0)]
  s=s[0]
  p = False
  for x in r:
    if len(x)==1:
      p = not p
      continue
    if (p==False and x[1]=='1') or (p==True and x[1]=='2'):
        s = x[2] + s
    else:
        s = s + x[2]
  print("".join(s) if p==False else "".join(s)[::-1])
  
if __name__=='__main__':
  main()

Fixed submission:
def main():
  from collections import deque
  
  s,q,*r = [list(k.split()) for k in open(0)]
  que = deque(s[0])
  p = False
  for x in r:
    if len(x)==1:
      p = not p
      continue
    if (p==False and x[1]=='1') or (p==True and x[1]=='2'):
        que.appendleft(x[2])
    else:
        que.append(x[2])
  print("".join(que) if p==False else "".join(que)[::-1])
  
if __name__=='__main__':
  main()

Buggy python submission (verdict: Time Limit Exceeded):
def main():
  s,q,*r = [list(k.split()) for k in open(0)]
  s=s[0]
  p = False
  for x in r:
    if len(x)==1:
      p = not p
      continue
    if (p==False and x[1]=='1') or (p==True and x[1]=='2'):
        s = x[2] + s
    else:
        s = s + x[2]
  print("".join(s) if p==False else "".join(s)[::-1])
  
if __name__=='__main__':
  main()

Fixed submission:
def main():
  from collections import deque
  
  s,q,*r = [list(k.split()) for k in open(0)]
  que = deque(s[0])
  p = False
  for x in r:
    if len(x)==1:
      p = not p
      continue
    if (p==False and x[1]=='1') or (p==True and x[1]=='2'):
        que.appendleft(x[2])
    else:
        que.append(x[2])
  print("".join(que) if p==False else "".join(que)[::-1])
  
if __name__=='__main__':
  main()

Buggy python submission (verdict: Time Limit Exceeded):
s = list( input() )
q = int(input())
for _ in range(q):
  x = list(input().split())
  if x[0]=='1':
    s = s[::-1]
  else:
    f, c = x[1], x[2]
    if f == '1':
      s = [c] + s
    else:
      s = s + [c]
print("".join(s))

Fixed submission:
def main():
  from collections import deque
  
  s,q,*r = [list(k.split()) for k in open(0)]
  que = deque(s[0])
  p = False
  for x in r:
    if len(x)==1:
      p = not p
      continue
    if (p==False and x[1]=='1') or (p==True and x[1]=='2'):
        que.appendleft(x[2])
    else:
        que.append(x[2])
  print("".join(que) if p==False else "".join(que)[::-1])
  
if __name__=='__main__':
  main()
Buggy python submission (verdict: Runtime Error):
import itertools
n,k=map(int,input().split())
a=list(map(int,input().split()))
b=sorted([x[0]*x[1] for x in itertools.combinations(a,2)],reverse=False)
print(b[k-1])

Fixed submission:
a,b,c=map(int,input().split())
d=set([a,b,c])
if len(d)==2:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
p=tuple(map(float,input().split()))
exp=tuple([(pi+1)/2 for pi in p])
ans=0
for i in range(0,n-k+1):
  ans=max(ans,sum(exp[i:i+k]))
print(ans)

Fixed submission:
s,t=map(str,input().split())
a,b=map(int,input().split())
u=str(input())
if u==s:
  print(a-1,b)
else:
  print(a,b-1)
Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
exp=tuple(map(lambda x: (int(x)+1)/2,input().split()))
ans=0
for i in range(0,n-k+1):
  ans=max(ans,sum(exp[i:i+k]))
print(ans)

Fixed submission:
import numpy as np
n,k=map(int,input().split())
exp=tuple(map(lambda x: (int(x)+1)/2,input().split()))
l=np.cumsum(exp)

ans=l[k-1]
for i in range(0,n-k):
  x=l[i+k]-l[i]
  ans=max(ans,x)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
p=tuple(map(float,input().split()))
exp=tuple([(pi+1)/2 for pi in p])
ans=0
for i in range(0,n-k+1):
  ans=max(ans,sum(exp[i:i+k]))
print(ans)

Fixed submission:
import numpy as np
n,k=map(int,input().split())
exp=tuple(map(lambda x: (int(x)+1)/2,input().split()))
l=np.cumsum(exp)

ans=l[k-1]
for i in range(0,n-k):
  x=l[i+k]-l[i]
  ans=max(ans,x)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
p=tuple(map(float,input().split()))
exp=tuple([(pi+1)/2 for pi in p])
ans=0
for i in range(0,n-k+1):
  ans=max(ans,sum(exp[i:i+k]))
print(ans)

Fixed submission:
import numpy as np
n,k=map(int,input().split())
exp=tuple(map(lambda x: (int(x)+1)/2,input().split()))
l=np.cumsum(exp)

ans=l[k-1]
for i in range(0,n-k):
  x=l[i+k]-l[i]
  ans=max(ans,x)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
p=list(map(float,input().split()))
exp=tuple([(pi+1)/2 for pi in p])
ans=0
for i in range(0,n-k+1):
  ans=max(ans,sum(exp[i:i+k]))
print(ans)

Fixed submission:
import numpy as np
n,k=map(int,input().split())
exp=tuple(map(lambda x: (int(x)+1)/2,input().split()))
l=np.cumsum(exp)

ans=l[k-1]
for i in range(0,n-k):
  x=l[i+k]-l[i]
  ans=max(ans,x)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
def main():
  import sys
  input=sys.stdin.readline
  
  h,n=map(int,input().split())
  AB=tuple([list(map(int,input().split()))for _ in range(n)])
  
  DP=[10**8+1 for _ in range(h+2)]
  DP[0]=0
  for i in range(1,h+2):
    for a,b in AB:
      if i<=a:
        DP[i]=min(DP[i],b)
      else:
        DP[i]=min(DP[i],DP[i-a]+b)
        
  print(DP[h])
  
if __name__=="__main__":
  main()

Fixed submission:
def main():
  
  h,n=map(int,input().split())
  AB=tuple([list(map(int,input().split()))for _ in range(n)])
  
  DP=[float("inf") for _ in range(h+2)]
  DP[0]=0
  for i in range(1,h+2):
    for a,b in AB:
      if i<=a:
        DP[i]=min(DP[i],b)
      else:
        DP[i]=min(DP[i],DP[i-a]+b)
        
  print(DP[h])
  
if __name__=="__main__":
  main()

Buggy python submission (verdict: Time Limit Exceeded):
def main():
  import sys
  input=sys.stdin.readline
  
  h,n=map(int,input().split())
  AB=tuple([list(map(int,input().split()))for _ in range(n)])
  
  DP=[float("inf") for _ in range(h+2)]
  DP[0]=0
  for i in range(1,h+2):
    for a,b in AB:
      if i<=a:
        DP[i]=min(DP[i],b)
      else:
        DP[i]=min(DP[i],DP[i-a]+b)
        
  print(DP[h])
  
if __name__=="__main__":
  main()

Fixed submission:
def main():
  
  h,n=map(int,input().split())
  AB=tuple([list(map(int,input().split()))for _ in range(n)])
  
  DP=[float("inf") for _ in range(h+2)]
  DP[0]=0
  for i in range(1,h+2):
    for a,b in AB:
      if i<=a:
        DP[i]=min(DP[i],b)
      else:
        DP[i]=min(DP[i],DP[i-a]+b)
        
  print(DP[h])
  
if __name__=="__main__":
  main()

Buggy python submission (verdict: Time Limit Exceeded):
def main():
  
  h,n=map(int,input().split())
  AB=sorted([list(map(int,input().split()))for _ in range(n)])
  
  DP=[float("inf") for _ in range(h+2)]
  DP[0]=0
  for i in range(1,h+2):
    for a,b in AB:
      if i<=a:
        DP[i]=min(DP[i],b)
      else:
        DP[i]=min(DP[i],DP[i-a]+b)
        
  print(DP[h])
  
if __name__=="__main__":
  main()

Fixed submission:
def main():
  
  h,n=map(int,input().split())
  AB=tuple([list(map(int,input().split()))for _ in range(n)])
  
  DP=[float("inf") for _ in range(h+2)]
  DP[0]=0
  for i in range(1,h+2):
    for a,b in AB:
      if i<=a:
        DP[i]=min(DP[i],b)
      else:
        DP[i]=min(DP[i],DP[i-a]+b)
        
  print(DP[h])
  
if __name__=="__main__":
  main()
Buggy python submission (verdict: Runtime Error):
def main():
    お寿司, 食べたい = map(int, input().split())
    築地 = [[] for _ in range(お寿司)]
    for _ in range(食べたい):
        鮪, 蛸 = map(lambda x: int(x) - 1, input().split())
        築地[鮪].append(蛸)
        築地[蛸].append(鮪)

    やってるかい = [False] * お寿司
    寿司くいねぇ = おなかすいた(0, 築地, やってるかい, 0)

    print(寿司くいねぇ)


def おなかすいた(市場, 築地, やってるかい, お勘定):
    やってるかい[市場] = True
    if all(やってるかい):
        return お勘定 + 1

    for 豪遊 in 築地[市場]:
        if やってるかい[豪遊]:
            continue
        お勘定 = おなかすいた(豪遊, 築地, やってるかい, お勘定)
        やってるかい[豪遊] = False

    return お勘定


if __name__ == '__main__':
    main()


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

if a == b:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):

def main():


    from collections import deque


    h ,w = map(int, input().split())
    a = [ list(input())  for _ in range(h)]

    q = deque()

    if a[0][0]=='.':
        q.appendleft((0,0,0))
    else:
        q.appendleft((0,0,1))

    while(True):
        f = q.popleft()
        x, y, c = f[0], f[1], f[2]
        if (x,y) == (w-1,h-1):
            print(c)
            break

        for u, v in [(1,0), (0,1)]:
            if x + u <= w - 1 and y + v<= h - 1:
                n = a[x+u][y+v]=='.'
                if n:
                    q.appendleft((x + u, y + v, c + 0))
                else:
                    q.append((x + u, y + v, c + 1))



if __name__=='__main__':
    main()


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

if a == b:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
def main():
  import sys
  n,k=map(int,input().split())
  a=tuple(map(int,sys.stdin.readline().split()))
  
  def count(arr,now):
    return sum(element<now for element in arr)
  
  ans=0
  prime=10**9+7
  k=k%prime
  for i in range(n):
    left=count(a[:i],a[i])
    right=count(a[i+1:],a[i])
    res=(k-1)*k//2*(right+left)+right*k
    ans+=res%prime
    
  print(ans%prime)

if __name__=="__main__":
  main()

Fixed submission:
a,b = map(int,input().split())
c,d = min(a,b),max(a,b)
e = str(c) * d
print(e)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = list(map(int,input().split()))
count = 0
ll = [l[0]]
for i in range(n):
  m = l[i]
  ll.append(m)
  if min(ll) == m:
    count = count + 1
print(count)
    

Fixed submission:
n = int(input())
l = list(map(int,input().split()))
count = 0
f = l[0]
count = 0
for i in range(n):
  m = l[i]
  if f >= m :
    count += 1
    f = m
print(count)
Buggy python submission (verdict: Runtime Error):
n = int(input())
l = []
for _ in range(n):
  x,y = map(int, input().split())
  l.append([x+y,x-y])
l.sort()

temp = l[0][1]
count = n
i = 1
for i in range(1,n):
  if temp <= l[i][1]:
    pass
  else:
    temp = min(temp,l[i][1])
    count -= 1
print(count)

Fixed submission:
h = int(input())
w = int(input())
n = int(input())

m = max(h,w)
a = n // m
b = n % m
if b == 0:
  print(a)
else:
  print(a+1)

Buggy python submission (verdict: Runtime Error):
n = int(input())
l = []
for _ in range(n):
  A = list(map(int, input().split()))
  l.append(A)
  
l = sorted(l)
count = 0
count1 = 0
count2 = 0
for i in range(n-2):
  j = i + 1
  a = l[j][0]-l[j][1]
  b = l[j][0]+l[j][1]
  
  if l[j-1][0]+l[j-1][1] <= a and b <= l[j+1][0]-l[j+1][1]:
    count = count + 1
  if l[j-1][0]+l[j-1][1] >= a and b >= l[j+1][0]-l[j+1][1]:
    count1 = count1 + 1
  else:
    count2 = count2 + 1 

sum = count + count2/2
print(count+count1-1)

Fixed submission:
h = int(input())
w = int(input())
n = int(input())

m = max(h,w)
a = n // m
b = n % m
if b == 0:
  print(a)
else:
  print(a+1)

Buggy python submission (verdict: Runtime Error):
n = int(input())
l = []
for _ in range(n):
  A = list(map(int, input().split()))
  l.append(A)
  
l = sorted(l)

x0,l0 = l[0][0],l[0][1]
y = x0 + l0
count = 1
for i in range(n-1):
  x,d = l[i+1][0],l[i+1][1]
  z = x - d
  
  if z > y:
    y = x + d
    count = count + 1
  else:
    continue
print(count)

Fixed submission:
h = int(input())
w = int(input())
n = int(input())

m = max(h,w)
a = n // m
b = n % m
if b == 0:
  print(a)
else:
  print(a+1)