結果

問題 No.593 4進FizzBuzz
ユーザー NoNo
提出日時 2018-01-21 02:23:38
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 288 bytes
コンパイル時間 321 ms
コンパイル使用メモリ 10,608 KB
実行使用メモリ 12,060 KB
最終ジャッジ日時 2023-08-26 16:33:36
合計ジャッジ時間 30,352 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,884 KB
testcase_01 AC 14 ms
7,776 KB
testcase_02 AC 14 ms
7,880 KB
testcase_03 AC 13 ms
7,952 KB
testcase_04 AC 13 ms
7,948 KB
testcase_05 AC 13 ms
7,856 KB
testcase_06 AC 13 ms
7,896 KB
testcase_07 AC 13 ms
7,824 KB
testcase_08 AC 14 ms
7,864 KB
testcase_09 AC 14 ms
7,816 KB
testcase_10 AC 14 ms
7,912 KB
testcase_11 AC 13 ms
7,860 KB
testcase_12 AC 13 ms
7,776 KB
testcase_13 AC 13 ms
7,816 KB
testcase_14 AC 13 ms
7,888 KB
testcase_15 AC 13 ms
7,948 KB
testcase_16 AC 1,422 ms
11,900 KB
testcase_17 WA -
testcase_18 AC 1,436 ms
11,916 KB
testcase_19 AC 1,555 ms
11,956 KB
testcase_20 WA -
testcase_21 AC 1,382 ms
11,896 KB
testcase_22 AC 1,395 ms
11,904 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 1,436 ms
11,856 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 1,442 ms
11,928 KB
testcase_30 AC 1,393 ms
11,996 KB
testcase_31 AC 1,383 ms
11,836 KB
testcase_32 AC 1,469 ms
12,044 KB
testcase_33 AC 1,459 ms
11,960 KB
testcase_34 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = input()
ln = len(n)
a = 0
b = 0
c = 0
ans = ""

for i in range(0,ln):
    a += int(n[i])
    if i % 2 == 0:
        b += int(n[i])
    else:
        c += int(n[i])
    
if a % 3 == 0:
    ans += "Fizz"
if (b - c) % 11  == 0:
    ans += "Buzz"
if ans == "":
    ans = n
    
print(ans)
0