LightOJ – Necklace LightOJ, Mathematics / By Abu Rifat Muhammed Problem Name: Necklace Judge: LightOJ Algorithms & DS: GCD, Extended GCD, Binary Exponentiation, Modular Inverse