← All problems

Fizz Buzz

EasyImplementation

Given an integer n, return a list of strings 1..n where multiples of 3 are 'Fizz', multiples of 5 are 'Buzz', multiples of both are 'FizzBuzz', otherwise the number as string.

Examples

Input: n = 5
Output: ["1","2","Fizz","4","Buzz"]

Hints

Solution

Language:
Loading editor…
Output0 lines
Run your code to see output here.
Click Run all tests to check your solution against 3 test cases.