結果

問題 No.593 4進FizzBuzz
ユーザー neko_the_shadowneko_the_shadow
提出日時 2018-06-11 23:14:25
言語 Bash
(Bash 5.1.16)
結果
TLE  
実行時間 -
コード長 198 bytes
コンパイル時間 100 ms
コンパイル使用メモリ 5,324 KB
実行使用メモリ 43,276 KB
最終ジャッジ日時 2023-09-13 03:27:22
合計ジャッジ時間 5,846 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

read n; echo ${n} | rev | fold -s1 | awk '{printf("%d*4^%d\n", $0, NR-1)}' | paste -sd+ | bc | awk -v n=${n} '{
  print $0 % 15 == 0 ? "FizzBuzz" : $0 % 3 == 0 ? "Fizz" :$0 % 5 == 0 ? "Buzz" : n;
}'
0