(defun main (&rest argv) (declare (ignorable argv)) (let* ((n (read))) (if (>= n 50) (format t "000000000000") (let ((s 1)) (loop for i from 1 to n do (setf s (mod (* s i) 1000000000000))) (if (> n 14) (format t "~12,'0d~%" s) (format t "~d~%" s)))))) (main)