Query Bits......Wrong answer

What is the fault??My code:

Hey @sayanwinz your code is absolutely correct ,just make all your variables long long int to avoid integer overflow and then your code works fine.
If you still have any further queries please feel free to ask ,otherwise kindly mark the doubt as resolved