Data Structures & AlgorithmsHardTCS NQT Digital · ICPC regional

Problem: The number 1729 is written in base 10. What is the sum of its digits in base 12, given as the digit sum of 1729 written in base 12?

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

Correct answer: B. 2

Convert 1729 to base 12 (it is 1001 in base 12) and add its digits, giving 2. The base change matters; summing the base-10 digits gives 19.

More Coding Interview Problems questions

Exams that ask this topic