結果
問題 | No.279 木の数え上げ |
ユーザー |
![]() |
提出日時 | 2016-03-31 13:43:27 |
言語 | F# (F# 4.0) |
結果 |
AC
|
実行時間 | 346 ms / 2,000 ms |
コード長 | 509 bytes |
コンパイル時間 | 8,333 ms |
コンパイル使用メモリ | 191,196 KB |
実行使用メモリ | 41,216 KB |
最終ジャッジ日時 | 2024-10-14 15:27:32 |
合計ジャッジ時間 | 15,556 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (267 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/
ソースコード
open System open System.Text let min (x:int) (y:int) = if x < y then x else y [<EntryPoint>] let main args = let S:string = Console.ReadLine() let mutable t, r, e = 0, 0, 0 for x = 0 to S.Length-1 do if S.[x] = 't' then t <- t + 1 else if S.[x] = 'r' then r <- r + 1 else if S.[x] = 'e' then e <- e + 1 done e <- e / 2 let res = min (min t r) e printfn "%d" res 0