結果

問題 No.593 4進FizzBuzz
ユーザー toyuzukotoyuzuko
提出日時 2020-08-19 22:14:39
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 952 ms / 2,000 ms
コード長 230 bytes
コンパイル時間 469 ms
コンパイル使用メモリ 82,464 KB
実行使用メモリ 79,764 KB
最終ジャッジ日時 2024-04-20 11:09:02
合計ジャッジ時間 20,689 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
52,788 KB
testcase_01 AC 38 ms
52,476 KB
testcase_02 AC 34 ms
52,328 KB
testcase_03 AC 33 ms
52,440 KB
testcase_04 AC 34 ms
52,356 KB
testcase_05 AC 34 ms
52,484 KB
testcase_06 AC 33 ms
53,448 KB
testcase_07 AC 33 ms
52,876 KB
testcase_08 AC 33 ms
53,496 KB
testcase_09 AC 35 ms
52,084 KB
testcase_10 AC 35 ms
53,148 KB
testcase_11 AC 34 ms
52,812 KB
testcase_12 AC 33 ms
52,484 KB
testcase_13 AC 34 ms
52,500 KB
testcase_14 AC 34 ms
53,208 KB
testcase_15 AC 35 ms
52,000 KB
testcase_16 AC 945 ms
79,684 KB
testcase_17 AC 945 ms
79,328 KB
testcase_18 AC 933 ms
79,580 KB
testcase_19 AC 944 ms
79,596 KB
testcase_20 AC 949 ms
79,436 KB
testcase_21 AC 925 ms
79,764 KB
testcase_22 AC 933 ms
79,572 KB
testcase_23 AC 936 ms
79,672 KB
testcase_24 AC 929 ms
79,700 KB
testcase_25 AC 935 ms
79,572 KB
testcase_26 AC 952 ms
79,560 KB
testcase_27 AC 931 ms
79,460 KB
testcase_28 AC 941 ms
79,464 KB
testcase_29 AC 940 ms
79,468 KB
testcase_30 AC 934 ms
79,344 KB
testcase_31 AC 932 ms
79,492 KB
testcase_32 AC 943 ms
79,672 KB
testcase_33 AC 938 ms
79,440 KB
testcase_34 AC 932 ms
79,488 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = input()
M = 0
for i in range(len(N)):
    M += pow(4, i, 15) * int(N[~i])
    M %= 15
if M % 3 == 0 and M % 5 == 0:
    print('FizzBuzz')
elif M % 3 == 0:
    print('Fizz')
elif M % 5 == 0:
    print('Buzz')
else:
    print(N)
0