open Printf (* Afficher une liste d'entiers *) let rec pints l = match l with | [] -> print_newline () | [x] -> printf "%i\n" x | x::xs -> printf "%i " x ; pints xs ;; let rec decompose_aux u q x = let v = u / q in if v < q then [ u ] else if u mod q = 0 then q::decompose_aux v q x else decompose_aux u (q + x) (if q < 5 then 2 else x mod 4 + 2) ;; let decompose u = if u < 1 then failwith "decompose" else if u = 1 then [] else decompose_aux u 2 1 ;; let u = int_of_string Sys.argv.(1) ;; let r = decompose u ;; let _ = pints r ; exit 0 ;;