clojure-hackos.palindromes
Solution to the Beautiful Days at the Movies challenge. See: https://www.hackerrank.com/challenges/beautiful-days-at-the-movies
count-factors
(count-factors i j k)
Counts the number of integers between i
and j
that, when subtracted from their mirror-opposites, have k
as factor.
Example:
(count-factors '(20 23 6))
;; => 2
Explanation:
|20 - 02| % 6 == 0
|21 - 12| % 6 != 0
|22 - 22| % 6 == 0
|23 - 32| % 6 != 0