Skip to content

Instantly share code, notes, and snippets.

@qcom
Created February 7, 2013 00:04
Show Gist options
  • Save qcom/4727115 to your computer and use it in GitHub Desktop.
Save qcom/4727115 to your computer and use it in GitHub Desktop.
CodeEval Problem (Easy)
Description:
Given a number n and two integers p1,p2 determine if the bits in position p1 and p2 are the same or not. Positions p1,p2 and 1 based.
Input sample:
The first argument will be a text file containing a comma separated list of 3 integers, one list per line. e.g.
86,2,3
125,1,2
Output sample:
Print to stdout, 'true'(lowercase) if the bits are the same, else 'false'(lowercase).
e.g.
true
false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment