Created
November 29, 2015 04:49
-
-
Save jin/81b4738b247d8c2ee161 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let rec read_lines () = | |
try let line = read_line () in | |
int_of_string (line) :: read_lines() | |
with | |
End_of_file -> [] | |
let f n arr = (*Complete this function*) | |
let () = | |
let n::arr = read_lines() in | |
let ans = f n arr in | |
List.iter (fun x -> print_int x; print_newline ()) ans;; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment