Codeforces Round 523 (Div. 2)
A
Coins
Codeforces
800
原题
←B →
翻译中…

You have unlimited number of coins with values $1, 2, \ldots, n$. You want to select some set of coins having the total value of $S$.

翻译中…

It is allowed to have multiple coins with the same value in the set. What is the minimum number of coins required to get sum $S$?

翻译中…

Input

翻译中…

The only line of the input contains two integers $n$ and $S$ ($1 \le n \le 100\,000$, $1 \le S \le 10^9$)

翻译中…

Output

翻译中…

Print exactly one integer — the minimum number of coins required to obtain sum $S$.

翻译中…

Note

翻译中…

In the first example, some of the possible ways to get sum $11$ with $3$ coins are:

翻译中…
  • $(3, 4, 4)$
  • $(2, 4, 5)$
  • $(1, 5, 5)$
  • $(3, 3, 5)$
翻译中…

It is impossible to get sum $11$ with less than $3$ coins.

翻译中…

In the second example, some of the possible ways to get sum $16$ with $3$ coins are:

翻译中…
  • $(5, 5, 6)$
  • $(4, 6, 6)$
翻译中…

It is impossible to get sum $16$ with less than $3$ coins.

翻译中…

样例

Input #1
5 11
Output #1
3
InputCopy OutputCopy
Input #2
6 16
Output #2
3
InputCopy OutputCopy
题目信息
题号
1061A
时间限制
2 s
内存限制
256 MB
标签
贪心
模拟
数学

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。