Back to the 100
Problem 001Math
Easy

Fizz Buzz

001

Return the Fizz Buzz sequence from 1 to n. Use "Fizz" for multiples of 3, "Buzz" for multiples of 5, and "FizzBuzz" for both.

EXAMPLES

Example 1
Input
{
  "n": 5
}

Output
[
  "1",
  "2",
  "Fizz",
  "4",
  "Buzz"
]

FUNCTION SHAPE

n: intstringArray
00:00
3 local tests readyRun with ⌘/Ctrl + Enter. Your code stays in this browser.

Runs solve(...) locally in a browser worker. SWE Playbook does not submit your code. Only run code you trust; Python code may access the network.