Find the nth positive integer divisible by a or b using binary search.
Constraints
Example
```python >>> nth_magical_number(1, 2, 3) 2 >>> nth_magical_number(4, 2, 3) 6 >>> nth_magical_number(5, 2, 4) 10 >>> nth_magical_number(3, 6, 4) 8 ```
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints