(defun bitto10 (bit) (cond ((equal bit '0) 0) ((equal bit '1) 1) (t (+ (mod bit 10) (* 2 (bitto10 (/ (- bit (mod bit 10)) 10))))))) ; 1,0からなるアトムのxor (defun myxor (a b) (cond ((and (equal a '0) (equal b '0)) '0) ((and (equal a '0) (equal b '1)) '1) ((and (equal a '1) (equal b '0)) '1) ((and (equal a '1) (equal b '1)) '0))) ;複数桁のxor (defun mylogxor (a b) (cond ((and (equal a 0) (equal b 0)) 0) ((and (equal a 0) (equal b 1)) 1) ((and (equal a 1) (equal b 0)) 1) ((and (equal a 1) (equal b 1)) 0) (t (+ (mod (myxor (mod a 10) (mod b 10)) 10) (* 10 (mylogxor (/ (- a (mod a 10)) 10) (/ (- b (mod b 10)) 10))))))) (defun solve (a b) (bitto10 (mylogxor a b))) (princ (solve (read) (read)))