def is_power_of_two(n: int) -> bool:
    if n <= 0:
        return False
    return (n & (n - 1)) == 0

# Test cases
print(is_power_of_two(1))  # True
print(is_power_of_two(16)) # True
print(is_power_of_two(3))  # False
