結果

問題 No.593 4進FizzBuzz
ユーザー GrayCoderGrayCoder
提出日時 2017-11-12 22:51:42
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 313 bytes
コンパイル時間 348 ms
コンパイル使用メモリ 10,672 KB
実行使用メモリ 11,976 KB
最終ジャッジ日時 2023-08-16 11:03:43
合計ジャッジ時間 19,117 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,904 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 16 ms
7,812 KB
testcase_04 AC 15 ms
7,908 KB
testcase_05 AC 15 ms
7,824 KB
testcase_06 AC 15 ms
7,812 KB
testcase_07 AC 15 ms
7,920 KB
testcase_08 WA -
testcase_09 AC 15 ms
7,812 KB
testcase_10 AC 15 ms
7,776 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 15 ms
7,820 KB
testcase_15 AC 15 ms
7,900 KB
testcase_16 AC 839 ms
11,824 KB
testcase_17 WA -
testcase_18 AC 840 ms
11,848 KB
testcase_19 AC 846 ms
11,836 KB
testcase_20 WA -
testcase_21 AC 840 ms
11,832 KB
testcase_22 AC 840 ms
11,836 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 839 ms
11,928 KB
testcase_27 AC 835 ms
11,792 KB
testcase_28 WA -
testcase_29 AC 838 ms
11,972 KB
testcase_30 AC 821 ms
11,828 KB
testcase_31 AC 823 ms
11,752 KB
testcase_32 AC 825 ms
11,828 KB
testcase_33 AC 850 ms
11,752 KB
testcase_34 AC 847 ms
11,928 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    N = input()

    three = five = 0
    for s in N:
        three = (three * 4 + int(s)) % 3
        five = (five * 4 + int(s)) % 11

    ans = ''
    if not three:
        ans += 'Fizz'
    if not five:
        ans += 'Buzz'

    if ans == '':
        print(N)
    else:
        print(ans)

main()
0