(use scheme.bitwise) (define yuki812 (let* ((n (read)) (k (read))) (if (> k n) (display "INF\n") (let loop-x ((x n) (res 0)) (if (> x (* 2 n)) (print res) (if (= (bitwise-and n x) n) (let loop-y ((y x) (res res)) (if (> y (+ x k)) (loop-x (+ x 1) res) (if (= (bitwise-and x y) n) (loop-y (+ y 1) (+ res 1)) (loop-y (+ y 1) res)))) (loop-x (+ x 1) res)))))))