Search⌘ K
AI Features

Nth Magical Number

Nth Magical Number asks for the nth positive integer divisible by either of two given numbers, returning the result modulo a large prime.

Statement

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