No.593 Base-4 FizzBuzz
問題文最終更新日: 2026-06-26 21:14:15
English (AI translation)
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence.
Back to the original
yukicoder contest 177
(順位表)
の他の問題:
Problem Statement
You are given a base-$4$ number $N_{(4)}$.
If $N_{(4)}$ is divisible by $3_{(10)}$, print Fizz; if it is divisible by $5_{(10)}$, print Buzz;
if it is divisible by both, print FizzBuzz; if it is divisible by neither, print $N_{(4)}$ itself.
Note: A number $N$ written in base $m$ is denoted by $N_{(m)}$.
Input
$N_{(4)}$
$N_{(4)}$ is a positive integer, and the number of digits $ |N_{(4)}|$ of $N_{(4)}$ satisfies $ 1 \leqq |N_{(4)}| \leqq 2\times10^6$.
Output
Print the answer on a single line. End the output with a newline.
Sample
Sample 1
Input
3
Output
Fizz
Sample 2
Input
11
Output
Buzz
$11_{(4)} = 5_{(10)}$
Sample 3
Input
33
Output
FizzBuzz
$33_{(4)} = 15_{(10)}$
Sample 4
Input
1333
Output
1333
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
treeone