結果

問題 No.593 4進FizzBuzz
ユーザー GrayCoder
提出日時 2017-11-12 22:51:42
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 313 bytes
コンパイル時間 225 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 14,628 KB
最終ジャッジ日時 2024-11-24 23:20:36
合計ジャッジ時間 21,178 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 2
other AC * 21 WA * 10
権限があれば一括ダウンロードができます

ソースコード

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