GATE | GATE CS 2019 | Question 31

The value of 351 mod 5 is _________ .

Note: This was Numerical Type question.
(A) 1
(B) 2
(C) 3
(D) 4


Answer: (B)

Explanation: According to chinese remainder theorem:

= 351 mod 5 
= (33)17 mod 5 
= (27)17 mod 5
= {(22)8*21} mod 5
= {(4)8*(2)} mod 5
= {(-1)8*(2)} mod 5
= {(1*2)} mod 5
= {(2)} mod 5
= 2  

Note: You can solve it directly by using power and mod operations in given calculator.

So, option (B) is correct.


Quiz of this Question



My Personal Notes arrow_drop_up


Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.