結果
問題 | No.436 ccw |
ユーザー | ichibanshibori |
提出日時 | 2016-10-28 22:33:11 |
言語 | F# (F# 4.0) |
結果 |
AC
|
実行時間 | 317 ms / 2,000 ms |
コード長 | 334 bytes |
コンパイル時間 | 9,287 ms |
コンパイル使用メモリ | 185,220 KB |
実行使用メモリ | 35,628 KB |
最終ジャッジ日時 | 2024-11-24 05:48:00 |
合計ジャッジ時間 | 18,382 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 24 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (438 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
let solve s = let num_c = seq s |> Seq.filter (fun c -> c = 'c') |> Seq.length let num_w = seq s |> Seq.filter (fun c -> c = 'w') |> Seq.length if num_c - 1 < num_w then num_c - 1 else num_w let () = let s = stdin.ReadLine() solve s |> printfn "%d"