878 Nth Magical Number
878. Nth Magical Number
1. Question
Input: N = 1, A = 2, B = 3
Output: 2Input: N = 4, A = 2, B = 3
Output: 6Input: N = 5, A = 2, B = 4
Output: 10Input: N = 3, A = 6, B = 4
Output: 82. Implementation
3. Time & Space Complexity
Last updated