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 タイパー高橋`` ()