結果

問題 No.593 4進FizzBuzz
ユーザー Konton7
提出日時 2019-05-02 23:03:16
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 236 bytes
コンパイル時間 196 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 60,420 KB
最終ジャッジ日時 2024-12-31 13:48:43
合計ジャッジ時間 35,738 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 3
other AC * 10 WA * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

s = input()
s1 = [ int(v) for v in list(s) ]
s2 = [ s1[i]*((-1)**(len(s)-i)) for i in range(len(s)) ]

ans = ""
if  sum(s1) % 3 == 0:
    ans += "fizz"
if  sum(s2) == 0:
    ans += "buzz"
if ans == "":
    print(s)
else:
    print(ans)
0