結果

問題 No.593 4進FizzBuzz
ユーザー bellangeldindonbellangeldindon
提出日時 2019-05-21 11:33:46
言語 Python2
(2.7.18)
結果
TLE  
実行時間 -
コード長 294 bytes
コンパイル時間 642 ms
コンパイル使用メモリ 7,160 KB
実行使用メモリ 71,952 KB
最終ジャッジ日時 2023-10-17 10:29:13
合計ジャッジ時間 50,288 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
6,448 KB
testcase_01 AC 11 ms
6,448 KB
testcase_02 AC 11 ms
6,448 KB
testcase_03 AC 11 ms
6,448 KB
testcase_04 AC 10 ms
6,448 KB
testcase_05 AC 11 ms
6,448 KB
testcase_06 AC 11 ms
6,448 KB
testcase_07 AC 10 ms
6,448 KB
testcase_08 AC 11 ms
6,448 KB
testcase_09 AC 11 ms
6,448 KB
testcase_10 AC 10 ms
6,448 KB
testcase_11 AC 10 ms
6,448 KB
testcase_12 AC 10 ms
6,448 KB
testcase_13 AC 11 ms
6,448 KB
testcase_14 AC 10 ms
6,448 KB
testcase_15 AC 11 ms
6,448 KB
testcase_16 TLE -
testcase_17 TLE -
testcase_18 TLE -
testcase_19 TLE -
testcase_20 TLE -
testcase_21 TLE -
testcase_22 TLE -
testcase_23 TLE -
testcase_24 TLE -
testcase_25 TLE -
testcase_26 TLE -
testcase_27 TLE -
testcase_28 TLE -
testcase_29 TLE -
testcase_30 TLE -
testcase_31 TLE -
testcase_32 TLE -
testcase_33 TLE -
testcase_34 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

mod3 = [0, 1, 2, 0]
mod5 = [[0, 1, 2, 3], [0, 4, 3, 2]]
N = raw_input()
cnt3 = 0
cnt5 = 0
for i in range(0, len(N)):
	cnt3 += mod3[int(N[-1-i])]
	cnt5 += mod5[i%2][int(N[-1-i])]
ans = ''
if cnt3%3 == 0: ans = ans + 'Fizz'
if cnt5%5 == 0: ans = ans + 'Buzz'
if ans != '': print ans
else: print N
0