結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 335 ms
34,768 KB
testcase_01 AC 339 ms
34,660 KB
testcase_02 AC 337 ms
34,904 KB
testcase_03 AC 340 ms
34,676 KB
testcase_04 AC 338 ms
34,732 KB
testcase_05 AC 342 ms
34,756 KB
testcase_06 AC 338 ms
34,616 KB
testcase_07 AC 337 ms
34,776 KB
testcase_08 AC 338 ms
34,736 KB
testcase_09 AC 336 ms
34,652 KB
testcase_10 MLE -
testcase_11 MLE -
testcase_12 MLE -
testcase_13 AC 399 ms
63,048 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 を復元しました (232 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 (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