Advertisement
Guest User

Untitled

a guest
Jul 11th, 2019
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. (defun xu-2 (x y)
  2. (declare (ignore x y))
  3. (error "Yeah!")
  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. (defun main ()
  20. (handler-case
  21. (h23 (read))
  22. (error (err)
  23. (declare (ignorable err))
  24. #+sbcl(sb-ext:quit :unix-status 0)
  25. (format *error-output* "~A~%" err))))
  26.  
  27. (with-input-from-string (*standard-input* "1
  28. 2 3
  29. ")
  30. (main))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement