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 + bigint a,s2 + bigint b) (0I,0I) |> fun (a,b) -> printfn "%s %s" <| a.ToString() <| b.ToString() ``No.35 タイパー高橋`` ()