結果

問題 No.593 4進FizzBuzz
ユーザー neko_the_shadowneko_the_shadow
提出日時 2018-06-11 23:33:08
言語 Bash
(Bash 5.1.16)
結果
AC  
実行時間 1,151 ms / 2,000 ms
コード長 244 bytes
コンパイル時間 312 ms
コンパイル使用メモリ 7,088 KB
実行使用メモリ 6,020 KB
最終ジャッジ日時 2023-09-13 03:30:28
合計ジャッジ時間 23,955 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
外部呼び出し有り
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
4,380 KB
testcase_01 AC 6 ms
4,380 KB
testcase_02 AC 6 ms
4,376 KB
testcase_03 AC 6 ms
4,380 KB
testcase_04 AC 5 ms
4,380 KB
testcase_05 AC 6 ms
4,376 KB
testcase_06 AC 7 ms
4,380 KB
testcase_07 AC 7 ms
4,380 KB
testcase_08 AC 6 ms
4,376 KB
testcase_09 AC 6 ms
4,380 KB
testcase_10 AC 6 ms
4,380 KB
testcase_11 AC 6 ms
4,380 KB
testcase_12 AC 7 ms
4,376 KB
testcase_13 AC 6 ms
4,380 KB
testcase_14 AC 6 ms
4,380 KB
testcase_15 AC 6 ms
4,380 KB
testcase_16 AC 1,147 ms
5,844 KB
testcase_17 AC 1,142 ms
6,020 KB
testcase_18 AC 1,145 ms
5,800 KB
testcase_19 AC 1,138 ms
5,808 KB
testcase_20 AC 1,151 ms
5,828 KB
testcase_21 AC 1,143 ms
5,864 KB
testcase_22 AC 1,138 ms
5,988 KB
testcase_23 AC 1,140 ms
5,780 KB
testcase_24 AC 1,141 ms
5,840 KB
testcase_25 AC 1,141 ms
5,852 KB
testcase_26 AC 1,148 ms
5,872 KB
testcase_27 AC 1,138 ms
5,760 KB
testcase_28 AC 1,138 ms
5,816 KB
testcase_29 AC 1,139 ms
5,836 KB
testcase_30 AC 1,107 ms
5,868 KB
testcase_31 AC 1,098 ms
5,756 KB
testcase_32 AC 1,132 ms
5,848 KB
testcase_33 AC 1,143 ms
5,772 KB
testcase_34 AC 1,141 ms
5,824 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

fold -s1 | awk '{
  mod3 = (mod3 * 4 + $0) % 3
  mod5 = (mod5 * 4 + $0) % 5
  n = n $0
} END {
  print (mod3 == 0 && mod5 == 0) ? "FizzBuzz" :
        (mod3 == 0             ) ? "Fizz"     :
        (             mod5 == 0) ? "Buzz"     : n;
}'
0