#K67962. FizzBuzz Problem

    ID: 32759 Type: Default 1000ms 256MiB

FizzBuzz Problem

FizzBuzz Problem

Given an integer \(n\), generate a sequence of numbers from 1 to \(n\) with the following replacements:

  • If a number is a multiple of 3, replace it with Fizz.
  • If a number is a multiple of 5, replace it with Buzz.
  • If a number is a multiple of both 3 and 5 (i.e. \(3\times5\)), replace it with FizzBuzz.

For non-positive values of \(n\), the output should be an empty sequence. Input is provided via stdin and the result must be printed to stdout as space-separated items on a single line.

inputFormat

The input consists of a single integer \(n\) provided on one line from stdin.

outputFormat

Output the transformed sequence as space-separated elements on a single line to stdout. If \(n\) is non-positive, output nothing.

## sample
1
1