Problem:


Score : 100 points

Problem Statement

Serval is fighting with a monster.

The health of the monster is H.

In one attack, Serval can decrease the monster's health by A.
There is no other way to decrease the monster's health.

Serval wins when the monster's health becomes 0 or below.

Find the number of attacks Serval needs to make before winning.

Constraints

1 \leq H \leq 10^4

1 \leq A \leq 10^4

All values in input are integers.

Input

Input is given from Standard Input in the following format:

H A

Output

Print the number of attacks Serval needs to make before winning.

Sample Input 1

10 4

Sample Output 1

3

After one attack, the monster's health will be 6.

After two attacks, the monster's health will be 2.

After three attacks, the monster's health will be -2.

Thus, Serval needs to make three attacks to win.

Sample Input 2

1 10000

Sample Output 2

1

Sample Input 3

10000 1

Sample Output 3

10000



Sample input:
10 4


Sample output:
3

Submission status: Accepted

Solution code:
H,A= map(int,input().split())

print(-(-H//A))

Submission status: Accepted

Solution code:
a, b = map(int,input().split())
print(-(-a//b))

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict, deque
import bisect
from heapq import *
from math import factorial, ceil, floor
from collections import defaultdict
import itertools
sys.setrecursionlimit(200000)
input = sys.stdin.readline

# N, M, = map(int, input().split())
# N = int(input())
# L = [int(v) for v in input().split()]
# L = [[int(v) for v in input().split()] for _ in range(N)]
# L = [int(input()) for _ in range(N)]
# L = [list(input().strip())  for _ in range(N)]
# S = input().strip()

N, M, = map(int, input().split())

print(ceil(N / M))

Submission status: Accepted

Solution code:
H,A = map(int,input().split())
print(-(-H//A))

Submission status: Accepted

Solution code:
h, a = map(int, input().split())

print(-(-h // a))

Submission status: Accepted

Solution code:
n,k=map(int,input().split())
print((n-1)//k+1)

Submission status: Accepted

Solution code:
import sys
import fractions
import math
MAX_INT = int(10e12)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

H, A = IL()
print(math.ceil(H/A))

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))

a,b=MAP()
print((a+b-1)//b)

Submission status: Accepted

Solution code:
H, A = map(int, raw_input().split())
print (H+A-1)/A

Submission status: Accepted

Solution code:
# coding: utf-8
from math import ceil
H, A = map(int, input().split())
print(ceil(H / A))

Submission status: Accepted

Solution code:
import sys
import math
from collections import defaultdict

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N,num):
    if N<=0:
        return [[] for _ in range(num)]
    elif num==1:
        return [I() for _ in range(N)]
    else:
        read_all = [tuple(II()) for _ in range(N)]
        return map(list, zip(*read_all))

#################

H,A = II()

print(math.ceil(H/A))

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
print((a-1)//b+1)

Submission status: Accepted

Solution code:
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
    return list(map(int,input().split()))
def m(): #複数文字
    return map(int,input().split())
def onem(): #Nとかの取得
    return int(input())
def s(x): #圧縮
    a = []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): #listをスペースごとに分ける
    return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
    return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False
"""
def nibu(x,n,r):
    ll = 0
    rr = r
    while True:
        mid = (ll+rr)//2

    if rr == mid:
        return ll
    if (ここに評価入れる):
        rr = mid
    else:
        ll = mid+1
"""

h,a = m()

print(-(-h//a))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

import sys, math
sys.setrecursionlimit(300000)


def solve(H: int, A: int):
    ret = math.ceil(H / A)
    print(ret)
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    H = int(next(tokens))  # type: int
    A = int(next(tokens))  # type: int
    solve(H, A)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import bisect
import cmath
import heapq
import itertools
import math
import operator
import os
import random
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7
# MOD = 998244353


H, A = list(map(int, sys.stdin.buffer.readline().split()))

ans = math.ceil(H / A)
print(ans)

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    h,a = LI()
    print(math.ceil(h/a))
    return

#Solve
if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
yes="yes"
no="no"
Yes="Yes"
No="No"
h,a=map(int,input().split())
print(0--h//a)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
def input(): return sys.stdin.readline().rstrip()

def main():
    H,A=map(int,input().split())
    print(-(-H//A))

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
  
H, N = map(int, input().split())
A = list(map(int, input().split()))

if H - sum(A) <= 0:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
H,N = map(int,input().split())
A = list(map(int,input().split()))

if H - sum(A) <= 0:
    print('YES')
else:
    print('NO')

Submission status: Runtime Error

Solution code:
h,a = map(int,input().split())
print(h//a+map(h%a!=0))

Submission status: Runtime Error

Solution code:
H, N = map(int,input().split())
special_move = list(map(int,input().split()))

if H < sum(special_move):
    result = 'Yes'
else:
    result = 'No'

print(result)

Submission status: Runtime Error

Solution code:
H, N = map(int, input().split())
A = input()

waza = 0
for i in range(0, N):
    waza = waza + int(A.split()[i])

if waza >= H:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
h,n=map(int,input().split())
ab = [list(map(int,input().split())) for i in range(n)]

dp=[float('inf')]*(h+1)
dp[0]=0
for i in range(h):
    for j in range(n):

        next=i+ab[j][0] if i+ab[j][0]<=h else h
        dp[next]=min(dp[next],dp[i]+ab[j][1])
print(dp[-1])

Submission status: Runtime Error

Solution code:
N, K= map(int, input().split())
lists = list(map(int, input().split()))
lists.sort()
if K>=N:
  print(0)
else:
  if K==0:
    SUM = sum(lists)
    print(SUM)
  else:
      del lists[-K:]
      SUM = sum(lists)
      print(SUM)

Submission status: Runtime Error

Solution code:
N, K= map(int, input().split())
lists = list(map(int, input().split()))
lists.sort()
if K>=N:
  print(0)
else:
  del lists[-K:]
  SUM = sum(lists)
  print(SUM)

Submission status: Runtime Error

Solution code:
N, K= map(int, input().split())
lists = list(map(int, input().split()))
lists.sort()
if K>=N:
  print(0)
else:
  if K==0:
    print(SUM)
  else:
      del lists[-K:-1]
      SUM = sum(lists)
      print(SUM)

Submission status: Runtime Error

Solution code:
H,N = map(int, input().split())
lists = list(map(int, input().split()))
lists.sort()
if N>=2:
  if lists[-2]+lists[-1]>=H:
    print('Yes')
  else:
    print('No')
else:
  if lists[0]>=H:
    print('Yes')
  else:
    print('No')

Submission status: Runtime Error

Solution code:
H,N = map(int, input().split())
lists = list(map(int, input().split()))
lists.sort()
if N>=2:
  if lists[N-1]+lists[N-2]>=H:
    print('Yes')
  else:
    print('No')
else:
  if lists[0]>=H:
    print('Yes')
  else:
    print('No')

Submission status: Runtime Error

Solution code:
H,N = map(int, input().split())
lists = list(map(int, input().split())
lists.sort()
if N>=2 and lists[N-1]+lists[N-2]>=H:
  print('Yes')
If N==1 and lists[0]>=H:
  print('Yes')
if N==1 and lists[0]<H:
  print('No')
else:
  print('No')

Submission status: Runtime Error

Solution code:
H,N = map(int, input().split())
lists = [] 
lists.append(int, input().split())
lists = lists.sort()
if N>=2 and lists[N-1]+lists[N-2]>=H:
  print('Yes')
If N==1 and lists[0]>=H:
  print('Yes')
if N==1 and lists[0]<H:
  print('No')
else:
  print('No')

Submission status: Runtime Error

Solution code:
H, N = map(int, input().split())
A = list(map(int, input().split()))
atk = 0
for i in A:
    atk += i
if H > atk:
    print("No")
else:
    print("Yes")

Submission status: Runtime Error

Solution code:
H, A = map(int, input.split())
ans = H // A
if H % A != 0:
  ans = ans + 1
print(ans)

Submission status: Runtime Error

Solution code:
ri = lambda S: [int(v) for v in S.split()]
def rii(): return ri(input())

H, A = rii()

print((H // A)

Submission status: Runtime Error

Solution code:
h,n=map(int,input().split())
a=map(int,input().split())
s=sum(a)

if s>=h:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
H = int(input())

def f(h):
  if h == 1:
    return 1
  else:
    return 1 + f(h//2)*2
  
print(f(H))

Submission status: Runtime Error

Solution code:
n = int(input())
s = input()


if n % 2 == 1:
	print('NO')
	exit()

half = n // 2

if s[:half] == s[:half]:
  	print('YES')
else:
    print('NO')

Submission status: Runtime Error

Solution code:
h,a = map(int,input().split())
ans = 0
for h >0:
  h -= a
  ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
H,A=map(int,input())
print(H//A+1)

Submission status: Runtime Error

Solution code:
h,a=map(int,input.split())
if h%a==0:
  print(h//a)
else:
  print(h//a+1)

Submission status: Runtime Error

Solution code:
h,a = map(int,input().split())
print(h//a + (1-int(h%a==0))

Submission status: Runtime Error

Solution code:
h,a = map(int,input().split())
print(h//a + (1-(h%a==0))

Submission status: Runtime Error

Solution code:
h,a = map(int,input())
print(h//a + (1-(h%a==0))

Submission status: Runtime Error

Solution code:
h, a = int(input())
if (h%a == 0):
  print(h//a)
else:
  print(h//a + 1)

Submission status: Runtime Error

Solution code:
h,n=[int(i) for i in input().split()]

waza=[None]

class Waza:
    def __init__(self,attack,power):
        self.attack=attack
        self.power=power

maxA=0
for i in range(n):
    a,b=[int(i) for i in input().split()]
    maxA=max(maxA,a)
    waza.append(Waza(a,b))


dp=[[10**9 for i in range(h+maxA)] for j in range(n+1)]

for i in range(n+1):
    for j in range(h+maxA):
        if j==0:
            dp[i][j]=0
        elif i==0:
            pass
        elif j-waza[i].attack>=0:
            dp[i][j]=min(dp[i-1][j],dp[i][j-waza[i].attack]+waza[i].power)

print(min(dp[-1][h:]))

Submission status: Runtime Error

Solution code:
h,a=map(int,input.split())
if h>a:
  print(h//a)
if h<=a:
  print(1)

Submission status: Runtime Error

Solution code:
h,a=map(int,input.split())
if h>a:
  print(h//a)
if h<a:
  print(1)

Submission status: Runtime Error

Solution code:
H, A = map(int, intput().split())
res = H // A
if H % A > 0:
  	res += 1
print(res)

Submission status: Runtime Error

Solution code:
H, A = map(int, intput().split())
res = H // A
if H % A > 0:
  	res += 1
print(res)

Submission status: Runtime Error

Solution code:
h,a,b,c,d,e=map(int,input().split())
if h-a-b-c-d-e>=0:print("No")
else:print("Yes")

Submission status: Runtime Error

Solution code:
h,a=map(int,input.split())
cnt=0
while True:
    h-=a
    cnt+=1
    if h<=0:
        break
print(cnt)

Submission status: Runtime Error

Solution code:
h,a=map(int,input.split())
cnt=0
while h>0:
    h-=a
    cnt+=1
print(cnt)

Submission status: Runtime Error

Solution code:
h,a=map(int,input.split())
cnt=0
while h>=0:
    h-=a
    cnt+=1
print(cnt)

Submission status: Runtime Error

Solution code:
h,a=map(int,input.split())
cnt=0
while h>=0:
    h-=a
    cnt+=1
print cnt

Submission status: Runtime Error

Solution code:
n,d,a=map(int,input().split())
num=[]
for i in range(n):
    num.append(list(map(int,input().split())))
num.sort(key=lambda x: x[0])
cnt=0
cnt2=0
num2=num[0][0]+d
ans=0
for i in range(n):
    yn=0
    for j in range(cnt,n):
        if num2+d<num[j][0]:
            cnt2=j-1
            yn=1
            break
    if yn==0:
        cnt2=n-1
    else:
        yn=0
    num3=-(num[cnt][1]//-a)
    ans+=num3
    for j in range(cnt,cnt2+1):
        num[j][1]-=a*num3
    for j in range(cnt,n):
        if num[j][1]>0:
            yn=1
            cnt=j
            break
    if yn==0 and num[-1][1]>0:
        yn=1
        cnt=n-1
    if yn==0:
        break
    num2=num[cnt][0]+d
print(ans)

Submission status: Runtime Error

Solution code:
from collections import deque 
import math
n, d, a = map(int, input().split())
l = [list(map(int, input().split())) for _ in range(n)]
l.sort(key = lambda x:x[0])
cnt = 0
queue = deque()
sum_bomb = 0
for i in range(n):
    while len(queue) != 0 and queue[0][0]<l[i][0]:
        sum_bomb -= queue[0][1] * a
        queue.popleft()
    l[i][1] -= sum_bomb
    if l[i][1] <= 0 :
        continue
    num = math.ceil(l[i][1]/a)
    right = l[i][0] + 2 * d
    queue.append([right, num])
    cnt += num
    sum_bomb += num * a
print(cnt)

Submission status: Runtime Error

Solution code:
H,A = map(int(),input().split)
print(H//A if H%A == 0 else H//A+1)

Submission status: Runtime Error

Solution code:
H, A = map(isn’t, input().split())
print((H + A - 1) // A)

Submission status: Runtime Error

Solution code:
N = int(input())

for i in range(100000):
    if 2**i <= N and N<2**(i+1):
        print(2**(i+1)-1)
        break

Submission status: Runtime Error

Solution code:
h,a = map(int,input().split())
if h % a = 0:
  print(h//a)
else:
  print(h//a+1)

Submission status: Runtime Error

Solution code:
h , a = map(int, input().split())

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

Submission status: Runtime Error

Solution code:
a,b=list(map(int,input()))
count=0
while (a<0):
  count+=1
  a-=b
print(count)

Submission status: Runtime Error

Solution code:
tmp = input().split(" ")

HP = int(tmp[0])
attack = int(tmp[1])

print(math.ceil(HP/attack))

Submission status: Runtime Error

Solution code:
(h,n),*t=[list(map(int,o.split()))for o in open(0)]
d=[0]*(h+10100)
for i in range(1,h+1):d[i]=min(d[i-a]+b for a,b in t)
print(d[h])

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>

using namespace std;
typedef long long ll;

#define MOD (long long)(1e9+7)
#define INF (1LL<<60)
#define rep(i,n) for(ll i = 0; i < (n); i++)
#define rep1(i,n) for(ll i = 1; i <= (n); i++)

template<class T> inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template<class T> inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}


// 最大公約数
ll gcd(ll a, ll b)
{
  if(b == 0) return a;
  return gcd(b, a % b);
}

// mod m におけるa の逆元
ll modinv(ll a, ll m) {
  ll b = m, u = 1, v = 0;
  while (b) {
    ll t = a / b;
    a -= t * b; swap(a, b);
    u -= t * v; swap(u, v);
  }
  u %= m;
  if (u < 0) u += m;
  return u;
}

// 素因数分解
vector<pair<ll, ll>> prim;
void pf(ll n)
{
  ll s = sqrt(n);
  ll r = 0;
  for(ll i = 2; i <= s; i++) {
    if((n % i) == 0) {
      r = 0;
      do {
	r++;
	n = n / i;
      } while((n % i) == 0);
      prim.push_back({i, r});
    }
  }
  if(n > s) {
    prim.push_back({n, 1});
  }
}

void solve()
{
  // ll N; cin >> N;
  // ll N, K; cin >> N >> K;
  // ll x, y, z; cin >> x >> y >> z;
  // ll a, b, c; cin >> a >> b >> c;
  // string s; cin >> s;
  // vector<ll> a(N); rep(i, N) cin >> a[i];
  
  // ll ans = 0;
  // bool ok = false;

  // cout << ans << endl;
  // cout << (ok?"Yes":"No") << endl;
}


int main(void)
{
  // ll t; cin >> t; rep(i, t)
  solve();
}

Submission status: Runtime Error

Solution code:
INPUT = list(input().split())
H = INT(INPUT[0])
A = INT(INPUT[1])
if H%A == 0:
  print(H//A)
else:
  print(H//A + 1)

Submission status: Runtime Error

Solution code:
INPUT = input().split()
H = INT(INPUT[0])
A = INT(INPUT[1])
print(H//A)

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
using namespace std;
int main(){
  int h,a;
  cin>>h>>a;
  if(h%a==0)cout<<h/a<<endl;
  else cout<<h/a+1<<endl;
  return 0;
}

Submission status: Runtime Error

Solution code:
H,A=map(int, input().split())
print(math.ceil(H/A))

Submission status: Runtime Error

Solution code:
print((int(input())+1)//2)

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
mon=list(map(int,input().split()))
mon.sort(reverse=True)

print(sum(mon[k:]))

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
mon=list(map(int,input().split()))
mon.sort(reverse=True)
for i in range(k):
  mon.pop(0)
print(sum(mon))

Submission status: Runtime Error

Solution code:
h,a=map(int,input().split()
ans=h//a+1
if h%a==0:
  ans-=1
print(ans)

Submission status: Runtime Error

Solution code:
h,n= map(int, input().split())
a = sum(list(map(int,input().split())))
print("Yes" if h-a <=0 else "No")

Submission status: Runtime Error

Solution code:
h, n= map(int, input().split())
l=list(map(int, input().split()))
if sum(l)>=h:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
def main(){
  print("H A")
  int H,A,r;
  raw.Input(H)
  raw.Input(A)
  r = H//A;
  print(r)
}

Submission status: Runtime Error

Solution code:
H, A = input().split() 

import math

print(math.ceil(H/A))

Submission status: Runtime Error

Solution code:
H,A=input().split()
print(int(H)//int(A)+1 if 1<=H<=10000 and 1<=A<=10000)

Submission status: Runtime Error

Solution code:
h,n = [int(x) for x in input().split()]

# dp[i] = min magic points to decrease i health points
maxmax = 99999999
dp = [maxmax for x in range(h+1)]
dp[0] = 0
for x in range(n):
    a,b = [int(r) for r in input().split()]
    
    for j in range(h):
        dp[min(j+a, h)] = min(dp[min(j+a, h)], dp[j]+b)

print(dp[h])

Submission status: Runtime Error

Solution code:
H, A = map(int,input.split())
count = 0
while H > 0:
  H -= A
  count += 1
  
print(count)

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
#define len(x) (int)(x.size())
#define all(vs) vs.begin(), vs.end()
using ii = pair<int, int>;
using ll = long long;

int32_t main(){
	ios::sync_with_stdio(0);	
	int h, a;
	cin >> h >> a;
	cout << int((h+a-1)/a) << endl;
}

Submission status: Runtime Error

Solution code:
h,a=map(int,input().split())
if h%a!=0:
  n=int(h/a)+1
  print(n)
else:
  n-=1
  print(n)

Submission status: Runtime Error

Solution code:
print((lambda x: x[0]//x[1])(map(int,input().split())))

Submission status: Runtime Error

Solution code:
h, a = int(input())

n = 0
while h > 0:
    h -= a
    n += 1
print(n)

Submission status: Runtime Error

Solution code:
h,a=mp(int,input().split());print(h//a+1 if h%a!=0 else h//a)

Submission status: Runtime Error

Solution code:
def resolve():
    import sys
    sys.setrecursionlimit(1000000)
    H = int(input())

    def battle(n):
        if n == 1:
            return 1
        return battle(n // 2) * 2 + 1

    print(battle(H))

    return
resolve()

Submission status: Runtime Error

Solution code:
#from pprint import pprint
#from collections import deque
#from collections import defaultdict
#from collections import Counter
#from copy import deepcopy
#from itertools
#import sys 
#sys.setrecursionlimit(N) #N回まで再起を許可する。
 
# = map(int,input().split())
 
# = list(map(int,input().split()))
 
# = [list(map(int,input().split())) for _ in range(XXXX)]
from sys import stdin
input = stdin.readline
 
h,n = map(int,input().split())
 
ab= [list(map(int,input().split())) for _ in range(n)]
 
dp = [[float("inf") for _ in range(h+1)] for _ in range(n+1)]
#dp[i][j]はi番目のものを選んだ時かつダメージ送料がjだったときの最小MP、
 
 
for i in range(1,n+1):
    dp[i][0] = 0
    for j in range(h+1):
        a = ab[i-1][0]
        b = ab[i-1][1]
        dp[i][j] = min(dp[i][j],dp[i-1][j])
        if j+a <= h:
            dp[i][j+a] = min(dp[i][j] + b, dp[i-1][j+a], dp[i][j+a])
        elif j+a > h:
            dp[i][h] = min(dp[i][j] + b, dp[i-1][h], dp[i][h])

 
print(dp[-1][-1])

#print(dp[-1])

Submission status: Runtime Error

Solution code:
s=input()
n=input()
print(s//n)

Submission status: Runtime Error

Solution code:
H, A = map(int, input())
n = (H-1)//A + 1
print(n)

Submission status: Runtime Error

Solution code:
import math
print(math.ceil(int(input())/int(input())))

Submission status: Runtime Error

Solution code:
H, A = map(int,input().split())

if(h % A != 0):
    print(H // A + 1)
else:
    print(H // A)

Submission status: Runtime Error

Solution code:
def main() -> None:
    H, N = rmi()
    AB = []
    for _ in range(N):
        AB.append(rmi())
    dp = [10 ** 9] * (H + 1)
    dp[0] = 0
    for damage, mp in AB:
        for i in range(len(dp)):
            prev = max(i - damage, 0)
            dp[i] = min(dp[i], dp[prev] + mp)
    w(dp[H])


def r() -> str:
    return input().strip()


def ri() -> int:
    return int(r())


def rmi(delim: str = ' ') -> tuple:
    return tuple(map(int, input().split(delim)))


def w(data) -> None:
    print(data)


def wm(*data, delim: str = ' ') -> None:
    print(delim.join(map(str, data)))


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3


def main() -> None:
    H, N = rmi()
    AB = []
    for _ in range(N):
        AB.append(rmi())
    dp = [10 ** 9] * (H + 1)
    dp[0] = 0
    for damage, mp in AB:
        for i in range(len(dp)):
            prev = max(i - damage, 0)
            dp[i] = min(dp[i], dp[prev] + mp)
    w(dp[H])


def r() -> str:
    return input().strip()


def ri() -> int:
    return int(r())


def rmi(delim: str = ' ') -> tuple:
    return tuple(map(int, input().split(delim)))


def w(data) -> None:
    print(data)


def wm(*data, delim: str = ' ') -> None:
    print(delim.join(map(str, data)))


if __name__ == '__main__':
    import sys
    sys.setrecursionlimit(10 ** 9)
    main()

Submission status: Runtime Error

Solution code:
n.m=map(int,input().split())
print(round(n/m))

Submission status: Runtime Error

Solution code:
def nibun_right(a, x):
 lo, hi = 0, len(a)
 while lo < hi:
  mid = (lo+hi)//2
  if x < a[mid][0]: hi = mid
  else: lo = mid+1
 return lo
N,D,A=map(int,input().split())
lst=[0]*N
for i in range(N):
 lst[i]=list(map(int,input().split()))
lst.sort()
ans=0
print(ans)

Submission status: Runtime Error

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
N,d,a = map(int,readline().split())

data0 = [0]*(N+1)
data1 = [0]*(N+1)
# 区間[l, r)に x を加算
def _add(data, k, x):
    while k <= N:
        data[k] += x
        k += k & -k
def add(l, r, x):
    _add(data0, l, -x*(l-1))
    _add(data0, r, x*(r-1))
    _add(data1, l, x)
    _add(data1, r, -x)

# 区間[l, r)の和を求める
def get(data, k):
    s = 0
    while k:
        s += data[k]
        k -= k & -k
    return s
def query(l, r):
  return get(data1,r-1)*(r-1)+get(data0,r-1)-get(data1,l-1)*(l-1)-get(data0,l-1)

xh = []
for _ in range(N):
    x,h = map(int,readline().split())
    xh.append((x,h))

xh = sorted(xh)
xl = [x for x,h in xh]

for i in range(N):
    add(i+1, i+2, xh[i][1])

import bisect,math

ans = 0
for i in range(N):
    hp = query(i + 1, i + 2)
    #print(data0,data1,hp)    
    if hp > 0:
        count = math.ceil(hp/a)
        ans += count
        damage = count * a
        idx = bisect.bisect_right(xl, xl[i] + 2*d)
        add(i+1, idx+1, -damage)
print(ans)

Submission status: Runtime Error

Solution code:
h,n=map(int,input().split())
a=list(map(int,input().split()))
sum=0
for i in range(n):
    sum+=a[i]
print('Yes' if sum>=h else 'No')

Submission status: Runtime Error

Solution code:
h,a = map(int,input().split())
print(int(h/a+1)

Submission status: Runtime Error

Solution code:
h,a=map(int,input().split())
count=0
while h>:
  h=h-a
  count=count+1
print(count)

Submission status: Runtime Error

Solution code:
h,a=map(int,input().split())
if h%a==0:
  print((int(h/a))
else:
  print((int(h/a)+1))

Submission status: Runtime Error

Solution code:
H,A = map(int,input().split())
print(H//A if H%A=0 else H//A+1)

Submission status: Runtime Error

Solution code:
h, a = map(int, input().split)
if h % a == 0:
    print(h//a)
else:
    print(h//a + 1)

Submission status: Runtime Error

Solution code:
H, N = map(int, input().split())
A = list(map(int, input().split()))
if H <= sum(A):
  print ('Yse')
else:
  print ('No')

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
H = sorted(list(map(int, input().split())))
print(sum([0] + H[:-K]) if K > 0 else sum(H))

Submission status: Runtime Error

Solution code:
N, K = map(int,input().split())
H = list(map(int,input().split()))

H.sort(reverse=True)
del H[:K]
H_sum = sum(H)
print(H_sum)

Submission status: Runtime Error

Solution code:
N,K = map(int,input().split())
H = list(map(int,input().split()))
H.sort()
if N<=K:
    print(0)
else:
    print(sum(H[0:N-K]))

Submission status: Runtime Error

Solution code:
n,k= map(int,input().split())
h = list(map(int,input().split()))
h.sort()
if n<=k:
  print(0)
else:
  a = h[:n-k]
  print(sum(a))

Submission status: Runtime Error

Solution code:
n,k= map(int,input().split())
h = list(map(int,input().split()))
h.sort()
if n<=k:
  print(0)
else:
  a = h[0:n-k]
  print(sum(a))

Submission status: Runtime Error

Solution code:
H,A = map(int,input())

count = 0

while H > 0:
	H -= A
	count += 1
    
print(count)

Submission status: Runtime Error

Solution code:
from bisect import bisect_left
import math
import sys
readlines = sys.stdin.readline

def main():
  n,d,a = map(int,input().split())
  xx = []
  hh = []
  X = []
  H = []
  for _ in range(n):
    tmp = list(map(int,input().split()))
    xx.append(tmp[0])
    hh.append(tmp[1])

  k = zip(xx,hh)
  q = sorted(k)
  for xxx,hhh in q:
    X.append(xxx)
    H.append(hhh)
  X = tuple(X)
  ans = 0
  end = n-1
  while True:
    x = X[end] - d
    start = bisect_left(X,x-d)
    num = math.ceil(H[end] / a)
    ans += num
    H[end] = 0
    e = end
    end = start-1
    for i in range(start,e):
      H[i] -= a * num
      if H[i] > 0:
        end = i
    if end < 0:
      break

  print(ans)
if __name__ == '__main__':
  main()

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline

N, D, A = map(int, input().split())
S = [0]*N
for i in range(N):
    x, h = map(int, input().split())
    if h % A == 0:
        h //= A
    else:
        h = h//A + 1
    S[i] = [x, h]

S.sort()
print(S)
cnt = 0

for i in range(N):
    if S[i][1] <= 0:
        continue
    cnt += S[i][1]
    dmg = S[i][1]
    max_X = S[i][0] + D*2
    for j in range(i+1, N):
        if S[j][0] > max_X:
            break
        S[j][1] -= dmg

print(cnt)

Submission status: Runtime Error

Solution code:
h, n = map(int, input().split())
a, b = [], []
for _ in range(n):
    i, j = map(int, input().split())
    a.append(i)
    b.append(j)

# DP
l = [0]
for i in range(1,h+1):
    cand = []
    for j in range(n):
        if i - a[j] >= 0 and l[i - a[j]] != 'none':
            cand.append(l[i - a[j]] + b[j])
    if cand == []:
        l.append('none')
    else:
        l.append(min(cand))
for i in range(h+1, h+max(a)):
    cand = []
    for j in range(n):
        if 0 <= i - a[j] < h and l[i - a[j]] != 'none':
            cand.append(l[i - a[j]] + b[j])
    if cand == []:
        l.append('none')
    else:
        l.append(min(cand))
l = l[h:]
l = [i for i in l if type(i) == int]
print(min(l))

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
n=list(map(int,input().split()))
n.sort(reverse=True)
for i in range(b):
  n.remove(n[i])
print(sum(n))

Submission status: Runtime Error

Solution code:
from sys import stdin
from sys import  setrecursionlimit
setrecursionlimit(30000)

[H, N] = [int(x) for x in stdin.readline().rstrip().split()]
As = []
Bs=[]
for i in range(N):
    [A, B] = [int(x) for x in stdin.readline().rstrip().split()]
    As.append(A)
    Bs.append(B)

dp_map = []
for i in range(N+1):
    temp_arr = [-1 for _ in range(H+1)]
    dp_map.append(temp_arr)
#dp_map = [[-1]*(H+1)]*(N+1)
#print(len(dp_map))
#print(len(dp_map[0]))

def DP(i, j):
    if j<=0:
        return 0
    if dp_map[i][j]!=-1:
        return dp_map[i][j]
    
    if i==1:
        dp_map[i][j] = DP(i,j-As[i-1])+Bs[i-1]
        return dp_map[i][j]

    dp_map[i][j] = min(DP(i-1,j),DP(i,j-As[i-1])+Bs[i-1])
    return dp_map[i][j]

print(DP(N,H))

Submission status: Runtime Error

Solution code:
h,a=[int(i)for i in input().split()]
if h%a==0:
  print(h//a)
else:
  print(''h//a+1)

Submission status: Runtime Error

Solution code:
n,a = map(int,input())
if n%a == 0:
  print(n//a)
else:
  print(n//a +1)

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
import sys


def solve(N: int, K: int, H: "List[int]"):
    if K >= N:
        return 0
    return sum(sorted(H, reverse=True)[K:])


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    H = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    print(solve(N, K, H))

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import math
H, A = map(int, input().split())
print(math.ceil(H,A))

Submission status: Runtime Error

Solution code:
H,A = map(int,input().split())
a = H // A
if  H % ! != 0:
	print(a+1)
else:
  print(a)