#K95257. FizzBuzz Variation
FizzBuzz Variation
FizzBuzz Variation
Given an array of integers, transform the array by replacing each number that is divisible by 3 with \(Fizz\), each number divisible by 5 with \(Buzz\), and those divisible by both 3 and 5 with \(FizzBuzz\). If a number is not divisible by 3 or 5, it remains unchanged.
You are required to read the input from stdin and output the result to stdout.
inputFormat
The first line of input contains a single integer \(n\), which is the number of elements in the array. The second line contains \(n\) space-separated integers.
outputFormat
Output a single line containing the transformed sequence. Each element should be separated by a space. Numbers that are not replaced must be printed as numbers, while the others are printed as their corresponding strings.
## sample6
3 5 15 7 20 9
Fizz Buzz FizzBuzz 7 Buzz Fizz