Scanf.scanf "%d %d %d" (fun l r n -> for i = 1 to n do let x = n - i + 1 in Printf.printf "%d\n" @@ (r + x) / n - (l + x - 1) / n done )