407192: GYM102697 163 FizzBuzz

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

163. FizzBuzztime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output
This problem is worth 10 points.

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".

Input

Given two line-separated integers $$$a$$$ and $$$b$$$, implement the method described above.

ExamplesInput
1
16
Output
1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
FizzBuzz
Input
11
18
Output
11
Fizz
13
14
FizzBuzz
16
17

加入题单

上一题 下一题 算法标签: