結果

問題 No.436 ccw
ユーザー バカらっくバカらっく
提出日時 2018-03-06 02:02:53
言語 Swift
(5.10.0)
結果
AC  
実行時間 8 ms / 2,000 ms
コード長 135 bytes
コンパイル時間 430 ms
コンパイル使用メモリ 100,392 KB
実行使用メモリ 7,616 KB
最終ジャッジ日時 2023-08-20 10:30:48
合計ジャッジ時間 1,594 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
7,544 KB
testcase_01 AC 3 ms
7,280 KB
testcase_02 AC 4 ms
7,456 KB
testcase_03 AC 3 ms
7,292 KB
testcase_04 AC 4 ms
7,608 KB
testcase_05 AC 3 ms
7,368 KB
testcase_06 AC 3 ms
7,616 KB
testcase_07 AC 3 ms
7,360 KB
testcase_08 AC 3 ms
7,368 KB
testcase_09 AC 4 ms
7,564 KB
testcase_10 AC 3 ms
7,268 KB
testcase_11 AC 3 ms
7,316 KB
testcase_12 AC 4 ms
7,400 KB
testcase_13 AC 3 ms
7,252 KB
testcase_14 AC 3 ms
7,396 KB
testcase_15 AC 4 ms
7,216 KB
testcase_16 AC 3 ms
7,320 KB
testcase_17 AC 3 ms
7,292 KB
testcase_18 AC 4 ms
7,376 KB
testcase_19 AC 3 ms
7,228 KB
testcase_20 AC 4 ms
7,324 KB
testcase_21 AC 8 ms
7,432 KB
testcase_22 AC 7 ms
7,604 KB
testcase_23 AC 8 ms
7,408 KB
testcase_24 AC 8 ms
7,424 KB
testcase_25 AC 7 ms
7,500 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

let inpt = readLine()!

let cCount = inpt.reduce(0, {$0 + ($1 == "c" ? 1 : 0)})

let ans = min(cCount-1, inpt.count-cCount)
print(ans)
0