lisp lang solution №2 update
This commit is contained in:
parent
43bdd6f1b4
commit
b4279293b4
2 changed files with 4 additions and 4 deletions
|
|
@ -45,7 +45,7 @@ exec ros -Q -- "$0" "$@"
|
|||
(type (integer 0 62) len))
|
||||
|
||||
(let* ((total-combinations
|
||||
(1- (ash 1 (the (integer 0 61) (- len 1))))))
|
||||
(1- (ash 1 (the (integer 0 62) len)))))
|
||||
(declare (type fixnum total-combinations))
|
||||
(format t "~D~%" total-combinations)
|
||||
(loop for i from 0 to total-combinations do
|
||||
|
|
@ -60,7 +60,7 @@ exec ros -Q -- "$0" "$@"
|
|||
(format t "ER: input parameters~%")
|
||||
(uiop:quit 1))
|
||||
(progn
|
||||
(let* ((len (length args))
|
||||
(let* ((len (- (length args) 1))
|
||||
(target (parse-integer (first args)))
|
||||
(mask (make-array len :element-type 'fixnum :initial-element 0))
|
||||
(numbers (coerce (mapcar #'parse-integer (rest args)) '(simple-array fixnum (*)))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue