Given an integer n, return a list of n strings. The string at position i (counting from 1) is for the number i and is chosen like this:
"FizzBuzz" if i can be divided by both 3 and 5.
"Fizz" if i can be divided by 3, but not by 5.
"Buzz" if i can be divided by 5, but not by 3.
- The number
i written as a string, in all other cases.
Examples
Example 1:
Input: n = 4
Output: ["1","2","Fizz","4"]
Explanation: 3 is "Fizz". The other numbers are written as they are.
Example 2:
Input: n = 10
Output: ["1","2","Fizz","4","Buzz","Fizz","7","8","Fizz","Buzz"]
Explanation: 3, 6 and 9 are "Fizz". 5 and 10 are "Buzz".
Example 3:
Input: n = 16
Output: ["1","2","Fizz","4","Buzz","Fizz","7","8","Fizz","Buzz","11","Fizz","13","14","FizzBuzz","16"]
Explanation: 15 can be divided by both 3 and 5, so it is "FizzBuzz".