結果
問題 | No.35 タイパー高橋 |
ユーザー | regerege |
提出日時 | 2016-01-11 08:17:32 |
言語 | F# (F# 4.0) |
結果 |
AC
|
実行時間 | 369 ms / 5,000 ms |
コード長 | 478 bytes |
コンパイル時間 | 7,799 ms |
コンパイル使用メモリ | 188,380 KB |
実行使用メモリ | 37,196 KB |
最終ジャッジ日時 | 2023-10-19 22:45:34 |
合計ジャッジ時間 | 10,388 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 364 ms
36,612 KB |
testcase_01 | AC | 369 ms
37,028 KB |
testcase_02 | AC | 364 ms
37,192 KB |
testcase_03 | AC | 365 ms
37,196 KB |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (254 ms)。 MSBuild のバージョン 17.7.3+8ec440e68 (.NET) main -> /home/judge/data/code/bin/Release/net7.0/main.dll main -> /home/judge/data/code/bin/Release/net7.0/publish/
ソースコード
let ``No.35 タイパー高橋`` () = let f = 12. / 1000. let N = int <| stdin.ReadLine() Seq.initInfinite (fun _ -> stdin.ReadLine().Split(' ')) |> Seq.take N |> Seq.map (fun arr -> let l = arr.[1].Length let a = int(f * (float arr.[0])) let b = a / l let c = if 1 <= b then l else a c,l-c) |> Seq.fold (fun (s1,s2) (a,b) -> s1+a,s2+b) (0,0) |> fun (a,b) -> printfn "%d %d" a b ``No.35 タイパー高橋`` ()