ログインしてください。
提出 #573216
ソースコード 拡げる
#!/bin/sh
a=(`cat -`)
d=0
c=""
for b in `echo ${a[1]} | fold -w 1`; do
if [ "$c" -ne "$b" ]; then
c=""
else
[ ! -z "$c" ] && d=$((d + 1))
c=$b
fi
done
[ ! -z "$c" ] && d=$((d + 1))
echo $((d / 2))
提出情報
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 0 / 100 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | sample-01.txt, sample-02.txt |
| All | sample-01.txt, sample-02.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt, 01-09.txt, 01-10.txt, 01-11.txt, 01-12.txt, 01-13.txt, 01-14.txt, 01-15.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 01-01.txt | WA | 39 ms | 1116 KiB |
| 01-02.txt | WA | 36 ms | 1084 KiB |
| 01-03.txt | WA | 39 ms | 1100 KiB |
| 01-04.txt | WA | 34 ms | 1120 KiB |
| 01-05.txt | WA | 35 ms | 1136 KiB |
| 01-06.txt | WA | 36 ms | 1120 KiB |
| 01-07.txt | WA | 34 ms | 1152 KiB |
| 01-08.txt | WA | 37 ms | 1104 KiB |
| 01-09.txt | WA | 34 ms | 1116 KiB |
| 01-10.txt | WA | 37 ms | 1236 KiB |
| 01-11.txt | WA | 34 ms | 1108 KiB |
| 01-12.txt | WA | 34 ms | 1240 KiB |
| 01-13.txt | WA | 34 ms | 1176 KiB |
| 01-14.txt | WA | 35 ms | 1180 KiB |
| 01-15.txt | WA | 34 ms | 1136 KiB |
| sample-01.txt | WA | 37 ms | 1168 KiB |
| sample-02.txt | WA | 33 ms | 1128 KiB |