Advertisement
Guest User

Untitled

a guest
Jul 11th, 2019
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. cl-user> (cat "/tmp/a.lisp")
  2. (defun xu-2 (x y)
  3. (declare (ignore x y))
  4. (values))
  5.  
  6. (defun explode-3 (value1)
  7. (let ((pos1 (position #\Space value1))
  8. (list-x '()))
  9. (push (parse-integer (subseq value1 (1+ pos1) (length value1))) list-x)
  10. (push (parse-integer (subseq value1 0 pos1)) list-x)
  11. (return-from explode-3 list-x)))
  12.  
  13. (defun h23 (test-o)
  14. (let ((explode1 nil))
  15. (loop for i from 1 to test-o do
  16. (setf explode1 (explode-3 (nth 0 (multiple-value-bind (a b) (read-line *standard-input*) (list a b)))))
  17. (xu-2 (nth 0 explode1) (nth 1 explode1)))))
  18.  
  19. (with-input-from-string (*standard-input* "1
  20. 2 3
  21. ")
  22. (h23 (read)))
  23.  
  24. ; No value
  25. cl-user> (load "/tmp/a.lisp")
  26. #P"/private/tmp/a.lisp"
  27. cl-user>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement