

Time Limit: 2 sec / Memory Limit: 1024 MB
配点 : 100 点
問題文
高橋くんは、自動販売機でジュースを買ったときの音が好きです。
その音は 1 回 A 円で聞くことができます。
高橋くんは B 円持っていますが、お気に入りの音を C 回聞くと満足するため、B 円で最大 C 回まで聞けるだけ聞きます。
高橋くんはお気に入りの音を何回聞くことになるでしょうか。
制約
- 入力は全て整数である。
- 1 \leq A, B, C \leq 100
入力
入力は以下の形式で標準入力から与えられる。
A B C
出力
高橋くんはお気に入りの音を何回聞くことになるか出力せよ。
入力例 1
2 11 4
出力例 1
4
高橋くんは 8 円以上持っているのでお気に入りの音を 4 回聞いて満足します。
入力例 2
3 9 5
出力例 2
3
高橋くんが満足できないこともあります。
入力例 3
100 1 10
出力例 3
0
Score : 100 points
Problem Statement
Takahashi likes the sound when he buys a drink from a vending machine.
That sound can be heard by spending A yen (the currency of Japan) each time.
Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.
How many times will he hear the sound?
Constraints
- All values in input are integers.
- 1 \leq A, B, C \leq 100
Input
Input is given from Standard Input in the following format:
A B C
Output
Print the number of times Takahashi will hear his favorite sound.
Sample Input 1
2 11 4
Sample Output 1
4
Since he has not less than 8 yen, he will hear the sound four times and be satisfied.
Sample Input 2
3 9 5
Sample Output 2
3
He may not be able to be satisfied.
Sample Input 3
100 1 10
Sample Output 3
0