Sponsored
Use these hints if you're stuck. Try solving on your own first.
Is there a formula we can use to find the count of all the good numbers?
Exponentiation can be done very fast if we looked at the binary bits of n.
Solve with full IDE support and test cases