Search⌘ K
AI Features

Nth Magical Number

Given n, a, and b, Nth Magical Number asks you to find the nth positive integer divisible by a or b, returning the result modulo a large prime.

Statement

Given three integers n, a, and b, return the nth ...