From b4279293b4db47aaf5606ed8c6ee0b2a1c3bb1f4 Mon Sep 17 00:00:00 2001 From: Tayfer Date: Sat, 28 Mar 2026 23:19:11 +0300 Subject: [PATCH] =?UTF-8?q?lisp=20lang=20solution=20=E2=84=962=20update?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lisp/ros/solution2.ros | 4 ++-- lisp/solution2.lisp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/ros/solution2.ros b/lisp/ros/solution2.ros index 59bfaf1..583e287 100755 --- a/lisp/ros/solution2.ros +++ b/lisp/ros/solution2.ros @@ -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 (*))))) diff --git a/lisp/solution2.lisp b/lisp/solution2.lisp index 8037f31..6dd6775 100644 --- a/lisp/solution2.lisp +++ b/lisp/solution2.lisp @@ -31,7 +31,7 @@ (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 1))))) (declare (type fixnum total-combinations)) (format t "~D~%" total-combinations) (loop for i from 0 to total-combinations do @@ -46,7 +46,7 @@ (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 (*)))))