#K6991. FizzBuzz Sequence Generator
FizzBuzz Sequence Generator
FizzBuzz Sequence Generator
Given an integer \(m\), generate a sequence of integers from 1 to \(m\) with specific substitutions. For each integer:
- If it is divisible by 3, substitute it with Fizz.
- If it is divisible by 5, substitute it with Buzz.
- If it is divisible by both 3 and 5, substitute it with FizzBuzz.
- Otherwise, keep the number as is.
For instance, when \(m = 15\), the correct sequence is: ["1", "2", "Fizz", "4", "Buzz", "Fizz", "7", "8", "Fizz", "Buzz", "11", "Fizz", "13", "14", "FizzBuzz"].
inputFormat
The input consists of a single integer (m) ((1 \leq m \leq 10^4)) provided via standard input.
outputFormat
Output the generated sequence where each element is separated by a single space. The output should be printed to standard output.## sample
1
1
</p>