LCM of 1 to n by ksk

open Num#load"nums.cma"let rec($)i l=i=0&read_int()$Int 1;i=1&()=print_endline(string_of_num l);i-1$l*/Int i//(Int i%l)and(%)m n=match mod_num m n with Int 0->n|r->n%r;;0$Int 1

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page