题库练习 Coins
← 上一题 下一题 →

A12091 | Coins

时间限制1s
内存限制256MB
通过 / 提交0/0

题目描述

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$ ?

输入格式

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

输出格式

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

输入输出样例

输入 #1
5 11
输出 #1
3
输入 #2
6 16
输出 #2
3
C++ 编辑器
输入
输出