結果

問題 No.593 4進FizzBuzz
ユーザー htkbhtkb
提出日時 2017-11-10 22:53:04
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 1,036 ms / 2,000 ms
コード長 160 bytes
コンパイル時間 388 ms
コンパイル使用メモリ 10,648 KB
実行使用メモリ 11,960 KB
最終ジャッジ日時 2023-08-16 03:32:35
合計ジャッジ時間 22,050 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
7,796 KB
testcase_01 AC 15 ms
7,848 KB
testcase_02 AC 15 ms
7,900 KB
testcase_03 AC 15 ms
7,992 KB
testcase_04 AC 14 ms
7,820 KB
testcase_05 AC 14 ms
7,884 KB
testcase_06 AC 14 ms
7,796 KB
testcase_07 AC 15 ms
7,828 KB
testcase_08 AC 14 ms
7,864 KB
testcase_09 AC 14 ms
7,884 KB
testcase_10 AC 15 ms
7,852 KB
testcase_11 AC 14 ms
7,832 KB
testcase_12 AC 14 ms
7,776 KB
testcase_13 AC 14 ms
7,820 KB
testcase_14 AC 14 ms
7,868 KB
testcase_15 AC 14 ms
7,820 KB
testcase_16 AC 1,014 ms
11,888 KB
testcase_17 AC 1,019 ms
11,892 KB
testcase_18 AC 984 ms
11,808 KB
testcase_19 AC 982 ms
11,912 KB
testcase_20 AC 1,010 ms
11,868 KB
testcase_21 AC 976 ms
11,920 KB
testcase_22 AC 1,036 ms
11,836 KB
testcase_23 AC 1,004 ms
11,908 KB
testcase_24 AC 983 ms
11,960 KB
testcase_25 AC 993 ms
11,872 KB
testcase_26 AC 1,013 ms
11,908 KB
testcase_27 AC 989 ms
11,868 KB
testcase_28 AC 1,000 ms
11,880 KB
testcase_29 AC 988 ms
11,876 KB
testcase_30 AC 991 ms
11,824 KB
testcase_31 AC 968 ms
11,892 KB
testcase_32 AC 956 ms
11,832 KB
testcase_33 AC 1,005 ms
11,852 KB
testcase_34 AC 1,008 ms
11,852 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = input()
n10 = 0
mul = 1
for i, c in enumerate(n[::-1]):
    n10 = (n10 + int(c)*mul)%15
    mul = (mul*4)%15
print("Fizz"*(n10%3==0)+"Buzz"*(n10%5==0) or n)
0