Favorite Sound

AtCoder
IDabc120_a
Time2000ms
Memory256MB
Difficulty
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$ [samples]
Samples
Input #1
2 11 4
Output #1
4

Since he has not less than $8$ yen, he will hear the sound four times and be satisfied.
Input #2
3 9 5
Output #2
3

He may not be able to be satisfied.
Input #3
100 1 10
Output #3
0
API Response (JSON)
{
  "problem": {
    "name": "Favorite Sound",
    "description": {
      "content": "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 m",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc120_a"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Takahashi likes the sound when he buys a drink from a vending machine.\nThat sound can be heard by spending $A$ yen (the currency of Japan) each time.\nTakahashi has $B$ yen. He will hear the sound as m...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments