結果

問題 No.279 木の数え上げ
ユーザー kuuso1
提出日時 2016-08-18 01:47:42
言語 F#
(F# 4.0)
結果
MLE  
実行時間 -
コード長 482 bytes
コンパイル時間 17,399 ms
コンパイル使用メモリ 195,140 KB
実行使用メモリ 253,636 KB
最終ジャッジ日時 2024-11-07 19:06:55
合計ジャッジ時間 16,444 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 9 MLE * 2 -- * 10
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (427 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/

ソースコード

diff #

open System
type Sol() =
    member this.Solve() = 
        let S = stdin.ReadLine()
        
        let rec cCnt ss c = 
            match ss with
            | [] -> 0
            | x :: tail -> (if x = c then 1 else 0 ) + cCnt tail c
        
        let ts = cCnt (Seq.toList S) 't'
        let rs = cCnt (Seq.toList S) 'r' 
        let es = ( cCnt (Seq.toList S) 'e' ) / 2
        
        printfn "%d" (Seq.min (ts::rs::es::[]) )
        
let mySol = new Sol()
mySol.Solve()
0