;https://yukicoder.me/problems/no/253 (let ( (numMin 10 […]
;https://yukicoder.me/problems/no/253 (let ( (numMin 10 […]
;https://yukicoder.me/problems/no/253 (let ( (numMin 10) (numMax 1000000001) ) (loop for turn from 0 do (let ((chkNum (if(= 0 turn) 100 (floor(/(+ numMin numMax) 2))))) (format t "? ~d~%" chkNum)(force-output) (let ((chk (read-line))) (if(string= "1" chk) (setf numMin chkNum) (if(string= "-1" chk) (setf numMax chkNum) (progn (format t "! ~d~%" (+ chkNum turn))(force-output) (return) ))) (when(< 0 numMin) (decf numMin)) (decf numMax) ) ) ) )