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: Runtime Error

Solution code:
x = input().split()
n = int(x[0])
k = int(x[1])
 
h = input().split()
 
h = sorted(h)
 
if n-k <= 0:
    print(0)
    exit()
 
c = 0
for i in range(n-k):
    c += int(h[i])
print(c)

Submission status: Runtime Error

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

print(count)

Submission status: Runtime Error

Solution code:
h=int(input())
n=len(list(bin(h)))-2
print(2**n-1)

Submission status: Runtime Error

Solution code:
h=input()
a=input()
H = int(h)
A= int(a)
n :int= H // A + 1
print(n)

Submission status: Runtime Error

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

print(count)

Submission status: Runtime Error

Solution code:
import math
H,A = [int(x) for x in input().spit()] print(math.ceil(A/B))

Submission status: Runtime Error

Solution code:
h=int(input())
a=int(input())
print((h+a-1)//a)

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:
x = input().split()
n = int(x[0])
k = int(x[1])
 
h = input().split()
 
sorted(h)
 
if n-k <= 0:
    print(0)
    exit()
 
c = 0
for i in range(n-k):
    c += int(h[i])
print(c)

Submission status: Runtime Error

Solution code:
def win(h,a):
	l=h
    cnt=0
  	while(l<=0):
		l-=a;
    	cnt+=1
    return cnt
  
"""
h=int(input())
a=int(input())
"""
h=10
a=4
print(win(h,a))

Submission status: Runtime Error

Solution code:
x = input().split()
n = int(x[0])
k = int(x[1])
 
h = input().split()
 
sorted(h)
 
if n-k <= 0:
    print(0)
    exit()
 
c = 0
for i in range(n-k):
    c += int(h[i])
print(c)

Submission status: Runtime Error

Solution code:
x,y = map(int,input().split())

li = list(map(int,input().split()))

a = sum(li)

if a > x:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
#include<iostream>
using namespace std;

int main() {
	int h, a;
	cin >> h >> a;
	cout << (h+a-1)/a << endl;
}

Submission status: Runtime Error

Solution code:
def win(h,a):
	l=h
    cnt=0
  	while(l<=0):
		l-=a;
    	cnt+=1
    return cnt
  
h=int(input())
a=int(input())
print(win(h,a))

Submission status: Runtime Error

Solution code:
num = int(input())
cnt = 0
while num % A ==0:
  num //= A
  cut += 1
print(cnt)

Submission status: Runtime Error

Solution code:
import math H,A = [int(c) for c in input().spit()] print(math.ceil(A/B))

Submission status: Runtime Error

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

while(h < 0){
    h -= a;
    count++
}
print(count)

Submission status: Runtime Error

Solution code:
n = list(int(map(int,input().split()))) 
H = n[0] 
A = n[1] 
sum = 0 
while H > 0 : 
    H = H - A 
    sum = sum + 1 
print(sum)

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
h=list(map(int,input().split()))
h.sort(reverse=True)
c=0
for i in range(k):
    h.pop(0)
    
for i in range(len(h)):
    c+=h[i]
print(c)

Submission status: Runtime Error

Solution code:
#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>

#if __cplusplus >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#endif

// C++
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif

using namespace std;

#define _GLIBCXX_DEBUG

using _loop_ll = long long;
#define REP(i,n) for(_loop_ll (i)=0; (i)<(_loop_ll)(n); (i)++)
#define FOR(i,a,b) for(_loop_ll (i)=(_loop_ll)(a); (i)<(_loop_ll)(b); (i)++)
#define FORR(i,a,b) for(_loop_ll (i)=(_loop_ll)(b)-1; (i)>=(_loop_ll)(a); (i)--)
 
#define ALL(v) (v).begin(),(v).end()
 
#define DEBUG(x) cerr<<#x<<": "<<(x)<<endl
#define DEBUG_VEC(v) cerr<<#v<<": ";REP(__i,(v).size())cerr<<((v)[__i])<<", ";cerr<<endl

using ll = long long;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vi>;
using vvl = vector<vl>;

constexpr long long int MOD = 1e9 + 7;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    
    int h, a;
    cin >> h >> a;

    int ans = 0;
    while(h > 0){
        h -= a;
        ans++;
    }
    cout << ans << endl;

    return 0;
};

Submission status: Runtime Error

Solution code:
import math A,B = [int(c) for o in input().spit()] print(math.ceil(A/B))

Submission status: Runtime Error

Solution code:
int count = 0
H = int(input())
A = int(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math A,B = [int(c) for o in input().spit()]
print(math.ceil(A/B))

Submission status: Runtime Error

Solution code:
int count = 0
H = int(input())
A = int(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
A,B = [int(c) for o in input().spit()]
print(math.ceil(A/B))

Submission status: Runtime Error

Solution code:
H,N=map(int, input().split())
v = list(input().split())
v = [int(x) for x in v]
if H <= sum(v):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
H = input()
A = input()
print(H/A//1)

Submission status: Runtime Error

Solution code:
int count = 0
H = int(input())
A = int(input())

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

Submission status: Runtime Error

Solution code:
h, n = (int(x) for x in input().split())
A = list(map(int, input().split()))

if n == len(A):
    if sum(A) >= h:
        print('yes')
    else:
        print('No')

Submission status: Runtime Error

Solution code:
#Serval vs Monster problem using python3.
#Developed by Aradhya Sharma.
H=1   #Monster health
A=1   #Decrease for 1 attack
count = 0
H=int(input())
A=int(input())
while H<=10000 and H>0 and A<=10000:
        H = H-A
        count = count + 1
    
print(count) # print number of attacks serval need to make.

Submission status: Runtime Error

Solution code:
import numpy as np
H, N = map(int, input().split())
A = np.array([int(num) for num in input().split()])
if H <= A.sum():
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
int count = 0
int H = input()
int A = input()

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

Submission status: Runtime Error

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

s = list(map(int, input().split()))

s_sum = sum(s)

if s_sum < H:
  print('No')
else:
  print('Yes')

Submission status: Runtime Error

Solution code:
H=input()
A=input()
n=H//A+1
print(n)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
A,H==(float(x) for x in input().split())
print(math.ceil(H/A))

Submission status: Runtime Error

Solution code:
H = int(input()) 
A = int(input()) 
sum = 0
while H > 0 : 
  H = H - A
  sum = sum + 1
print(sum)

Submission status: Runtime Error

Solution code:
a = input()
a = a.split(" ")
i = 0
while 1:
  if a[0]<0:
    break
  else:
    i = i+1
    a[0]=int(a[0])-int(a[1])
    
print(i)

Submission status: Runtime Error

Solution code:
H,A = map(int, input())
for i in range(H):
   H = H-4
   i += 1
   if H<= 0:
      break
print(i)

Submission status: Runtime Error

Solution code:
H,A=int(input()),int(input())
c=0
while(H>0):
	if((H>=1 or H<=10000) and(A>=1 or A<=10000)):
  		H=H-A
        c+=1
print(c)

Submission status: Runtime Error

Solution code:
h=int(input())
ans=0
c=1
while h>1:
    ans+=c
    c*=2
    h//=2
ans+=c
print(ans)

Submission status: Runtime Error

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

ans=0
while True:
   H -= A
   ans += 1
   if H<=0:
      break
        
print(ans)

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:
import math
A,H=input().split()
print(math.ceil(H/A))

Submission status: Runtime Error

Solution code:
a = input()
a = a.split(" ")
i = 0
while 1:
  if a[0]<0:
    break
  else:
    i = i+1
 	a[0]=a[0]-a[1]
    
print(i)

Submission status: Runtime Error

Solution code:
H = int(input())
A = int(input())
c = 0
while (H>0):
    H = H-A
    c = c+1
print(c)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
count = 0
H = input()
A = input()

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

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) + 1;
  }
  else{
  	cout << H /A;  
  }
  return 0;
}

Submission status: Runtime Error

Solution code:
def win(h,a):
	cnt=0
  	while(h<=0):
		h-=a;
    	cnt+=1
     return cnt
  
h=int(input())
a=int(input())
print(win(h,a))

Submission status: Runtime Error

Solution code:
H, A = input().split(" ")
H = int(H)
A = int(A)
return (H+A-1)//A

Submission status: Runtime Error

Solution code:
l = list(map(int, input().split()))

def attack(l):
    H = l[0]
    A = l[1]
    cnt = 0
    while H >= 0:
        H = H - A
        cnt += 1
    return cnt

print(cnt)

Submission status: Runtime Error

Solution code:
from math import seil

H, A = map(int, input().split())
print(ceil(H/A))

Submission status: Runtime Error

Solution code:
import numpy as np

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

x = list(map(int, input().split()))

win = 0
for i in range(N):
	for j in range(i+1, N):
		if x[i] + x[j] >= H:
			win = 1
			print("Yes")
			break
	if win == 1:
		break


if win == 0:
	print("No")

Submission status: Runtime Error

Solution code:
h, a = map(int, input().split())
h1 = h
x = 0
while h1 <= 0:
  h1 -= a
  x++
print(x)

Submission status: Runtime Error

Solution code:
h,j = map(int,input().split())
a = list(int(x) for x in input().split())
if sum(a) < h:
	print('No')
else:
	print('Yes')

Submission status: Runtime Error

Solution code:
import math
H, A= [int(i) for i in input().split()]
print(math.ceil(H,A))

Submission status: Runtime Error

Solution code:
userinput = input("")
userlist = userinput.split(" ")
H = int(user[0])
A = int(user[1])
numberkill = 0
if H <= 10000 and A <= 1000:
  while H > 0:
    H = H - A
    numberkill = +1
  if H < 0:
    numberkill = +1
    print(numberkill)
  else:
    print(numberkill)
else:
  print("")

Submission status: Runtime Error

Solution code:
import math

H,A = map(int, input().split)
float_ver = H / A
print(math.ceil(float_ver))

Submission status: Runtime Error

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

i = 0

while h > 0:
    h = h - a
    i += 1

print(i)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
b = int(input())
a = int(input())
c = 0
while (b>0):
    b = b-a
    c = c+1
print(c)

Submission status: Runtime Error

Solution code:
H, A = input().split(" ")
return (H+A-1)//A

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
h=int(input("H"))
a=int(input("A"))
count=0
while h>0:
  h=h-a
  count+=1
print(count)

Submission status: Runtime Error

Solution code:
def attack(h,a):
  x=0
  while(h<=0):
    h-=a
    x+=1
   return x

h=int(input())
a=int(input())
print(attack(h,a))

Submission status: Runtime Error

Solution code:
a = input()
a = a.split(" ")
i = 0
while 1:
  if a[0]<0:
    break
  else:
    i = i+1
 	b=a[0]-a[1]*i
    
print(i)

Submission status: Runtime Error

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

a_total = 0
count = 0
for i in range(0,h):
  a_total += a
  count += 1
  if h <= a_total:
    print(count)
    break

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <stdio.h>
#include <string.h>
int main(void){
	int H,A;
	scanf("%d %d",&H,&A);
	printf("%d",H/A+1);
	return 0;
}

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=0
while 1:
  a-=b
  c+=1
  if a<=0:
    break
  else:
    pass
print(c)

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
using namespace std;

int main() {
  int H, A;
  cin >> H >> A;
  int ans = 0;
  do{
      ans++;
      H -= A;
  }while(H>0);
  cout << ans << endl;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split()  ) #split()で分解したものを別々の変数に入れる

result=0

if a % b <>0:
    result += 1 

result += a // b 
print(result)

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
10000 1

Submission status: Runtime Error

Solution code:
H, A = input().split(" ")
print((H+A-1)//A)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
h,a=map(int, input().split())
count = 0
while True:
  result = h - a
  if (result > 0):
    count += 1
  else:
  	break 
return count

Submission status: Runtime Error

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

main()

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
inport math
line = input().split(' ')
M = int(line[0])
N = int(line[1])
print(math.ceil(M/N))

Submission status: Runtime Error

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

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:
inport math
line = input().split(' ')
M = int(line[0])
N = int(line[1])
print(math.floor(M/N))

Submission status: Runtime Error

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

print(math.ceil(H / a))

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;

long long n,q,m,a,b;
string ss;
int main(){
    cin>>n>>m;
    cout<<(n/m)+max(0*1ll,min(1*1ll,n%m))<<endl;
}

Submission status: Runtime Error

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

print(ceil(H/A))

Submission status: Runtime Error

Solution code:
H = int(input())
A = 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 = input()
num = (H + (A-1))//A
print(num)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
print(-(-a//b))

Submission status: Runtime Error

Solution code:
from math import ceil
a, b = map(int, input().split()
           print(ceil(a/b))

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
using namespace std;
typedef long long ll;

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

Submission status: Runtime Error

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