結果

問題 No.345 最小チワワ問題
ユーザー cmycmy
提出日時 2022-07-06 13:24:26
言語 Bash
(Bash 5.1.16)
結果
WA  
実行時間 -
コード長 174 bytes
コンパイル時間 59 ms
コンパイル使用メモリ 5,300 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-23 11:10:46
合計ジャッジ時間 6,374 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
4,376 KB
testcase_01 AC 43 ms
4,384 KB
testcase_02 AC 131 ms
4,376 KB
testcase_03 AC 142 ms
4,380 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 20 ms
4,376 KB
testcase_08 AC 19 ms
4,380 KB
testcase_09 AC 20 ms
4,376 KB
testcase_10 AC 31 ms
4,376 KB
testcase_11 AC 20 ms
4,380 KB
testcase_12 AC 1,041 ms
4,376 KB
testcase_13 AC 19 ms
4,376 KB
testcase_14 WA -
testcase_15 AC 64 ms
4,376 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 31 ms
4,384 KB
testcase_21 AC 41 ms
4,376 KB
testcase_22 AC 31 ms
4,376 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 119 ms
4,376 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 20 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

read s
s=c$s
while echo $s | grep -q c; do
  s=$(echo $s | sed s/^[^c]*c//)
  expr $(echo $s | sed -nE 's/[^c]*(c[^w]*w[^w]*w).*/\1/p' | wc -c) - 1
done | sort -nr | head -1
0