Data Structures & AlgorithmsHardCodeforces Div2 B-D · ICPC regional

What is the smallest positive integer n such that 2^n is greater than 100000?

  1. A. 17
  2. B. 16
  3. C. 20
  4. D. 5

Correct answer: A. 17

2¹⁶ = 65536 ≤ 100000 < 131072 = 2¹⁷, so n = 17. 16 is the off-by-one, 20 confuses the threshold with 2²⁰ ≈ 10⁶, and 5 is the number of zeros in 100000.

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

Exams that ask this topic