Skip to content

Files

Latest commit

9987a3c · Mar 6, 2018

History

History

019-bit-positions

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Mar 6, 2018
Mar 6, 2018
Mar 6, 2018
Mar 6, 2018

Bit Positions

Challenge 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 and p2 are 1 based.

Input sample:

The first argument will be a path to a filename 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