Problem list
Log in
#r02759 · Online Judge > GoldOJ

FizzBuzz

Bronze III 2.0 s 1024 MB

Given $n$, for each integer from $1$ to $n$ print FizzBuzz if it is a multiple of both $3$ and $5$, Fizz if a multiple of $3$, Buzz if a multiple of $5$, otherwise the number itself. One per line.

Input

One integer $n$ ($1 \le n \le 120$).

Output

Print the FizzBuzz result for $1$ through $n$, one per line.

Example 1

Input
16
Output
1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
FizzBuzz
16
Source
Online Judge > GoldOJ
Appears in
Not part of a ladder, contest or set yet.
Accepted 0 Submissions 0 Acceptance 0% Solvers 0

Discussion

Threads about this problem. Spoilers are collapsed; wrap hints in ||double bars||.

No discussion yet. Start a thread if something here needs explaining.

Recent submissions Open with filters
Code