結果

問題 No.593 4進FizzBuzz
ユーザー 👑 H20H20
提出日時 2021-11-25 15:19:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 144 ms / 2,000 ms
コード長 280 bytes
コンパイル時間 319 ms
コンパイル使用メモリ 87,092 KB
実行使用メモリ 80,536 KB
最終ジャッジ日時 2023-09-10 15:31:08
合計ジャッジ時間 6,634 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,276 KB
testcase_01 AC 73 ms
71,092 KB
testcase_02 AC 74 ms
71,248 KB
testcase_03 AC 72 ms
71,416 KB
testcase_04 AC 72 ms
71,260 KB
testcase_05 AC 74 ms
71,148 KB
testcase_06 AC 75 ms
71,380 KB
testcase_07 AC 74 ms
71,264 KB
testcase_08 AC 74 ms
71,456 KB
testcase_09 AC 73 ms
71,320 KB
testcase_10 AC 72 ms
71,380 KB
testcase_11 AC 73 ms
71,376 KB
testcase_12 AC 73 ms
71,384 KB
testcase_13 AC 73 ms
71,376 KB
testcase_14 AC 72 ms
71,272 KB
testcase_15 AC 73 ms
71,392 KB
testcase_16 AC 141 ms
80,104 KB
testcase_17 AC 140 ms
80,304 KB
testcase_18 AC 138 ms
80,308 KB
testcase_19 AC 142 ms
80,444 KB
testcase_20 AC 140 ms
80,144 KB
testcase_21 AC 142 ms
80,104 KB
testcase_22 AC 142 ms
80,512 KB
testcase_23 AC 140 ms
80,264 KB
testcase_24 AC 141 ms
80,216 KB
testcase_25 AC 141 ms
79,968 KB
testcase_26 AC 142 ms
80,452 KB
testcase_27 AC 142 ms
80,396 KB
testcase_28 AC 139 ms
80,276 KB
testcase_29 AC 144 ms
80,536 KB
testcase_30 AC 135 ms
80,264 KB
testcase_31 AC 136 ms
80,184 KB
testcase_32 AC 142 ms
80,204 KB
testcase_33 AC 141 ms
80,128 KB
testcase_34 AC 141 ms
80,236 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = input()
mod3 = 0
mod5 = 0
for i in range(len(N)):
    mod3 = (mod3*4 + int(N[i]))%3
    mod5 = (mod5*4 + int(N[i]))%5
isFizz = mod3==0
isBuzz = mod5==0
if isFizz and isBuzz:
    print('FizzBuzz')
elif isFizz:
    print('Fizz')
elif isBuzz:
    print('Buzz')
else:
    print(N)
0