Placement AptitudeHardTCS NQT · Infosys

The number N = 123456789101112…3940 is formed by writing the integers from 1 to 40 one after another. What is the remainder when N is divided by 8?

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

Correct answer: C. 4

Divisibility by 8 depends only on the last three digits. N ends in …3940, so its last three digits are 940, and 940 = 8 × 117 + 4. Remainder 4 (looking at only the last two digits, 40, wrongly gives 0).

More Advanced Quantitative Ability (Placement) questions

Exams that ask this topic