Skip to content

Instantly share code, notes, and snippets.

@ypsilon-takai
Created September 13, 2011 10:13
Show Gist options
  • Save ypsilon-takai/1213533 to your computer and use it in GitHub Desktop.
Save ypsilon-takai/1213533 to your computer and use it in GitHub Desktop.
GCJJ Practice1
(defn snapper [N K]
(if (= (repeat N \1) (take N (reverse (Integer/toBinaryString K))))
"ON"
"OFF"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment