Data Structures & AlgorithmsModerateICPC regional · TCS NQT

Problem: What are the last two decimal digits of 3^200?

  1. A. 2
  2. B. 1
  3. C. 0
  4. D. 3

Correct answer: B. 1

The last two digits are the residue modulo 100, which fast exponentiation gives directly. Reading the last two digits of 3^20 instead gives a different value.

More Coding Interview Problems questions

Exams that ask this topic