Modulo for encryption
CodeChefOpen on judge ↗
The Developer Student Club requires a good modulo for their encryption algorithms used for their app. They decided to generate a modulo using the following algorithm: Given a pair of adjacent primes $p1, p2$ ( $p2$ > $p1$ and $p2$ is the very next prime after $p1$) the modulo is the smallest number $M$ whose last digits are $p1$ and $M$ is divisible by $p2$, that is, if $p1 = 5$ and $p2 = 7$ t
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start