結果

問題 No.279 木の数え上げ
ユーザー kuuso1kuuso1
提出日時 2016-08-18 02:12:30
言語 F#
(F# 4.0)
結果
AC  
実行時間 346 ms / 2,000 ms
コード長 426 bytes
コンパイル時間 7,506 ms
コンパイル使用メモリ 194,736 KB
実行使用メモリ 41,600 KB
最終ジャッジ日時 2024-04-25 08:40:06
合計ジャッジ時間 16,402 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 304 ms
34,532 KB
testcase_01 AC 305 ms
34,276 KB
testcase_02 AC 310 ms
34,412 KB
testcase_03 AC 313 ms
33,852 KB
testcase_04 AC 303 ms
34,412 KB
testcase_05 AC 315 ms
34,012 KB
testcase_06 AC 308 ms
33,636 KB
testcase_07 AC 305 ms
34,404 KB
testcase_08 AC 310 ms
34,280 KB
testcase_09 AC 311 ms
34,404 KB
testcase_10 AC 336 ms
41,088 KB
testcase_11 AC 318 ms
36,036 KB
testcase_12 AC 328 ms
40,192 KB
testcase_13 AC 317 ms
35,576 KB
testcase_14 AC 342 ms
41,472 KB
testcase_15 AC 326 ms
41,088 KB
testcase_16 AC 321 ms
40,704 KB
testcase_17 AC 335 ms
41,600 KB
testcase_18 AC 320 ms
37,772 KB
testcase_19 AC 337 ms
41,344 KB
testcase_20 AC 346 ms
41,472 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (244 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 ts = Seq.fold (fun s c -> s + (if c = 't' then 1 else 0) ) 0 S
        let rs = Seq.fold (fun s c -> s + (if c = 'r' then 1 else 0) ) 0 S
        let es = Seq.fold (fun s c -> s + (if c = 'e' then 1 else 0) ) 0 S
        
        printfn "%d" (Seq.min (ts::rs::(es/2)::[]) )
        
let mySol = new Sol()
mySol.Solve()
0