The Power of Modulo N
CodeChefOpen on judge ↗
For given integers **_A_**, $B$ and $N$ you have to find ($(A^B)$ % $N$) - which is nothing but ($A$ power $B$) modulus $N$. simple isn’t it. ###Input: - First line of input contains $T$ denoting the number of testcases. The description of testcases follows. - The first line and only line of each test case contains three space-separated integers $A$, $B$ and $N$. ###Output: For each test cas
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