Jam-packed
题号:NC220437
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

The fruit harvest has been good this year, which means that your jam-selling company, which produces the price-winning Berry Artisanal and Pure Compote, is shipping out jam left and right! A customer has recently placed a huge order of n jars of jam. To ship these jars, you put them into boxes, each of which can hold up to k jars.

As is always the case with fragile goods, the jars might break in the process of being delivered. You want to avoid the jars bouncing around in their boxes too much, as that signifificantly increases the chance that they break. To circumvent this, you want to avoid having boxes that are too empty: that would inevitably result in the uncontrolled bouncing around, and subsequently breaking, of the jars. In particular, you want the box with the least number of jars to be as full as possible. In order to estimate the risk you are taking with your precious jars, you would like to know: how many jars does this box contain?

输入描述:

The input consists of:
    • A line with two integers n (1 ≤ n ≤ 1018), the number of jars that need to be packed, and k (1 ≤ k ≤ 1018), the number of jars a single box can hold.

输出描述:

Output the number of jars that the least fifilled box contains.
示例1

输入

复制
10 3

输出

复制
2
示例2

输入

复制
16 4

输出

复制
4
示例3

输入

复制
1 2

输出

复制
1