Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun read-list ()
- "Read-listV2"
- (let ((n (read *standard-input* nil)))
- (if (null n) nil
- (cons n (read-list)))))
- (defun dot-product (a b)
- "Compute the mathematical dot product of two vectors."
- (apply #'+ (mapcar #'* a b)))
- (defun solver ()
- (let ((input (read-list)
- (a (dot-product (first input) (second input)))
- (b (last input)))
- (format t "~a" (mod a b)))))
Advertisement
Add Comment
Please, Sign In to add comment