Data Structures & AlgorithmsVery hardGATE CS · ICPC regional
What is the sum of the decimal digits of 100!?
- A. 649
- B. 648
- C. 650
- D. 652
Correct answer: B. 648
100! is a 158-digit number whose digit sum is 648. Computing the factorial exactly and summing the digits is the direct route.
Practise more Arrays, Strings, Linked Lists, Stacks, Queues and Hashing questionsArrays, Strings, Linked Lists, Stacks, Queues and Hashing: notes and key points
More Arrays, Strings, Linked Lists, Stacks, Queues and Hashing questions
- How many trailing zeros does 1000! have in base 10?
- How many integers x in [1, 300] satisfy x ≡ 1 (mod 4) and x ≡ 2 (mod 3)?
- What is Euler's totient phi(360), the number of integers in [1, 360] coprime to 360?
- How many unordered pairs of distinct integers {a, b} from 1 to 12 are coprime to each other?
- What is the sum of i^3 mod 7 over i = 1 to 20?
- How many 1 bits does the binary representation of 45 contain?