Number of Multiples

AtCoder
IDaising2020_a
Time2000ms
Memory256MB
Difficulty
How many multiples of $d$ are there among the integers between $L$ and $R$ (inclusive)? ## Constraints * All values in input are integers. * $1 \leq L \leq R \leq 100$ * $1 \leq d \leq 100$ ## Input Input is given from Standard Input in the following format: $L$ $R$ $d$ [samples]
Samples
Input #1
5 10 2
Output #1
3

*   Among the integers between $5$ and $10$, there are three multiples of $2$: $6$, $8$, and $10$.
Input #2
6 20 7
Output #2
2

*   Among the integers between $6$ and $20$, there are two multiples of $7$: $7$ and $14$.
Input #3
1 100 1
Output #3
100
API Response (JSON)
{
  "problem": {
    "name": "Number of Multiples",
    "description": {
      "content": "How many multiples of $d$ are there among the integers between $L$ and $R$ (inclusive)?",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "aising2020_a"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "How many multiples of $d$ are there among the integers between $L$ and $R$ (inclusive)?\n\n## Constraints\n\n*   All values in input are integers.\n*   $1 \\leq L \\leq R \\leq 100$\n*   $1 \\leq d \\leq 100$\n\n#...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments