Wrong answer for test case 536870912


#1

536870912 can be expressed as 2^29, so return value should be 0.


#2

Instead of checking the condition (difference == 0) , try (difference< 0.00000001)