163. FizzBuzz

Codeforces
IDCF10269163
Time1000ms
Memory256MB
Difficulty
English · Original
Formal · Original
A "FizzBuzz" question is a standard interview question given to any computer science job applicants that tests the applicant's aptitude to solve and code basic problems, including the style they program in. A shocking fact, but many entry level computer science graduates do not know how to practically code, and this question is able to filter out the applicants that do not have the ability to program out of a simple question. Given two numbers, $x$ and $y$, print out the numbers in between these two numbers, $x$ (inclusive) and $y$ (exclusive), but if the number is a multiple of 3, replace the printed number with the string, "Fizz", and if the number is a multiple of 5, replace the printed number with the string, "Buzz". If the number is a multiple of both 3 and 5, replace the printed number with the combination of the two strings, "FizzBuzz". Given two line-separated integers $a$ and $b$, implement the method described above. ## Input Given two line-separated integers $a$ and $b$, implement the method described above. [samples]
**Definitions** Let $ a, b \in \mathbb{Z} $ with $ a < b $. **Constraints** The range of interest is $ [a, b) $, i.e., integers $ n $ such that $ a \leq n < b $. **Objective** For each integer $ n \in [a, b) $, output: - "FizzBuzz" if $ 3 \mid n $ and $ 5 \mid n $, - "Fizz" if $ 3 \mid n $ and $ 5 \nmid n $, - "Buzz" if $ 3 \nmid n $ and $ 5 \mid n $, - $ n $ otherwise.
API Response (JSON)
{
  "problem": {
    "name": "163. FizzBuzz",
    "description": {
      "content": "A \"FizzBuzz\" question is a standard interview question given to any computer science job applicants that tests the applicant's aptitude to solve and code basic problems, including the style they progr",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10269163"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "A \"FizzBuzz\" question is a standard interview question given to any computer science job applicants that tests the applicant's aptitude to solve and code basic problems, including the style they progr...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ a, b \\in \\mathbb{Z} $ with $ a < b $.  \n\n**Constraints**  \nThe range of interest is $ [a, b) $, i.e., integers $ n $ such that $ a \\leq n < b $.  \n\n**Objective**  \nFor each int...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments