Data Structures & AlgorithmsVery hardGATE CS · ICPC regional

What is 2^50 mod 13?

  1. A. 5
  2. B. 4
  3. C. 6
  4. D. 8

Correct answer: B. 4

The order of 2 modulo 13 is 12, since 2^12 is 1 modulo 13. Since 50 = 4*12 + 2, the value is 2^2 = 4.

More Arrays, Strings, Linked Lists, Stacks, Queues and Hashing questions

Exams that ask this topic