結果
| 問題 |
No.279 木の数え上げ
|
| コンテスト | |
| ユーザー |
kuuso1
|
| 提出日時 | 2016-08-26 01:15:38 |
| 言語 | F# (F# 4.0) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 500 bytes |
| コンパイル時間 | 8,003 ms |
| コンパイル使用メモリ | 195,984 KB |
| 実行使用メモリ | 161,836 KB |
| 最終ジャッジ日時 | 2024-11-08 05:29:42 |
| 合計ジャッジ時間 | 20,904 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 MLE * 10 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (253 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/
ソースコード
open System
type Sol() =
member this.Solve() =
let S = stdin.ReadLine()
let rec cCnt ss ret c =
match ss with
| [] -> ret
| x :: tail -> cCnt tail (ret + (if x = c then 1 else 0 )) c
let ts = cCnt (List.ofSeq S) 0 't'
let rs = cCnt (List.ofSeq S) 0 'r'
let es = ( cCnt (List.ofSeq S) 0 'e' ) / 2
printfn "%d" (Seq.min (ts::rs::es::[]) )
let mySol = new Sol()
mySol.Solve()
kuuso1