結果

問題 No.279 木の数え上げ
ユーザー kuuso1kuuso1
提出日時 2016-08-18 01:47:42
言語 F#
(F# 4.0)
結果
MLE  
実行時間 -
コード長 482 bytes
コンパイル時間 10,052 ms
コンパイル使用メモリ 195,192 KB
実行使用メモリ 224,512 KB
最終ジャッジ日時 2024-04-25 08:38:33
合計ジャッジ時間 16,982 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 319 ms
38,000 KB
testcase_01 AC 304 ms
40,028 KB
testcase_02 AC 308 ms
34,668 KB
testcase_03 AC 305 ms
34,676 KB
testcase_04 AC 302 ms
34,472 KB
testcase_05 AC 302 ms
34,664 KB
testcase_06 AC 305 ms
34,492 KB
testcase_07 AC 302 ms
34,548 KB
testcase_08 AC 306 ms
34,752 KB
testcase_09 AC 300 ms
34,636 KB
testcase_10 MLE -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /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 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