結果

問題 No.279 木の数え上げ
ユーザー kuuso1kuuso1
提出日時 2016-08-18 01:54:56
言語 F#
(F# 4.0)
結果
MLE  
実行時間 -
コード長 500 bytes
コンパイル時間 7,409 ms
コンパイル使用メモリ 189,168 KB
実行使用メモリ 163,356 KB
最終ジャッジ日時 2024-04-25 08:40:38
合計ジャッジ時間 21,107 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 341 ms
34,524 KB
testcase_01 AC 340 ms
34,840 KB
testcase_02 AC 341 ms
34,836 KB
testcase_03 AC 343 ms
34,432 KB
testcase_04 AC 341 ms
34,348 KB
testcase_05 AC 342 ms
34,940 KB
testcase_06 AC 342 ms
34,748 KB
testcase_07 AC 339 ms
34,396 KB
testcase_08 AC 342 ms
34,728 KB
testcase_09 AC 340 ms
34,632 KB
testcase_10 MLE -
testcase_11 MLE -
testcase_12 MLE -
testcase_13 AC 414 ms
63,292 KB
testcase_14 MLE -
testcase_15 MLE -
testcase_16 MLE -
testcase_17 MLE -
testcase_18 MLE -
testcase_19 MLE -
testcase_20 MLE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (286 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 ret c = 
            match ss with
            | x :: tail -> cCnt tail (ret + (if x = c then 1 else 0 )) c
            | [] -> ret
        
        let ts = cCnt (Seq.toList S) 0 't'
        let rs = cCnt (Seq.toList S) 0 'r' 
        let es = ( cCnt (Seq.toList S) 0 'e' ) / 2
        
        printfn "%d" (Seq.min (ts::rs::es::[]) )
        
let mySol = new Sol()
mySol.Solve()
0