power of 2 hackerrank solution