103020: [Atcoder]ABC302 A - Attack

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:13 Solved:0

Description

Score : $100$ points

Problem Statement

There is an enemy with stamina $A$. Every time you attack the enemy, its stamina reduces by $B$.

At least how many times do you need to attack the enemy to make its stamina $0$ or less?

Constraints

  • $1 \le A,B \le 10^{18}$
  • $A$ and $B$ are integers.

Input

The input is given from Standard Input in the following format:

$A$ $B$

Output

Print the answer.


Sample Input 1

7 3

Sample Output 1

3

Attacking three times make the enemy's stamina $-2$.

Attacking only twice makes the stamina $1$, so you need to attack it three times.


Sample Input 2

123456789123456789 987654321

Sample Output 2

124999999

Sample Input 3

999999999999999998 2

Sample Output 3

499999999999999999

Input

题意翻译

### 题目描述 一个人有 $A$ 点体力值,你可以攻击他,每次攻击使其体力值减 $B$,问要让他体力值降至 $0$ 或以下至少要攻击多少次。 ### 输入格式 共一行两个整数 $A,B$。($1\leqslant A,B\leqslant 10^{18}$) ### 输出格式 共一行一个整数,表示最少攻击次数。

Output

分数:100分

问题描述

有一个敌人,体力为$A$。每次你攻击敌人,它的体力减少$B$。

至少需要攻击敌人多少次,才能使它的体力为0或更少?

限制条件

  • $1 \le A,B \le 10^{18}$
  • $A$和$B$都是整数。

输入

输入从标准输入以以下格式给出:

$A$ $B$

输出

输出答案。


样例输入1

7 3

样例输出1

3

攻击三次会使敌人的体力变为-2。

攻击两次只能使体力变为1,因此需要攻击三次。


样例输入2

123456789123456789 987654321

样例输出2

124999999

样例输入3

999999999999999998 2

样例输出3

499999999999999999

HINT

活力为a,攻击一次减少b,多少次攻击后降为0?

加入题单

算法标签: