結果

問題 No.279 木の数え上げ
ユーザー kuuso1kuuso1
提出日時 2016-08-26 01:15:38
言語 F#
(F# 4.0)
結果
MLE  
実行時間 -
コード長 500 bytes
コンパイル時間 6,849 ms
コンパイル使用メモリ 195,708 KB
実行使用メモリ 161,824 KB
最終ジャッジ日時 2024-04-25 18:05:05
合計ジャッジ時間 20,101 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 337 ms
34,900 KB
testcase_01 AC 339 ms
34,788 KB
testcase_02 AC 344 ms
34,576 KB
testcase_03 AC 336 ms
34,100 KB
testcase_04 AC 335 ms
34,552 KB
testcase_05 AC 336 ms
34,756 KB
testcase_06 AC 336 ms
34,620 KB
testcase_07 AC 334 ms
33,880 KB
testcase_08 AC 338 ms
34,980 KB
testcase_09 AC 336 ms
34,584 KB
testcase_10 MLE -
testcase_11 MLE -
testcase_12 MLE -
testcase_13 AC 401 ms
63,184 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 を復元しました (227 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
            | [] -> 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()
0