Back to the Problem
One conditional and one multiplication — mind the 64-bit product.
Complexity: O(1) or O(log)