The value of 351 mod 5 is …
Topic-wise GATE CS PYQs with verified steps
GATE CSE 2019 · Q21
Time
Your answerNumerical answer
Solution
Official answer: 2 (±0)
CombinatoricsBy Fermat's Little Theorem, since is prime and :
We express the exponent in terms of multiples of :
Therefore:
Thus, the value of is 2.
Try the question first, then check your work.
Examiner trap
Apply Fermat's Little Theorem or observe the repeating cycle of powers of modulo .
This Combinatorics previous year question is Q21 of the GATE CSE 2019 paper. Find more GATE CSE PYQs on Combinatorics in Engineering Mathematics, or browse all GATE CSE PYQs.
Free diagnostic
Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Combinatorics PYQs now with no account.
An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.
Combinatorics has 19 GATE CSE PYQs across 15 papers from 2012 to 2025. 5 of them are 1-mark NAT questions like this one, and GATE CSE 2019 has 2.
How GATE tests CombinatoricsIndependent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.