Armstrong Number
CodeChefOpen on judge ↗
A number is an Armstrong Number if it is equal to the sum of its own digits raised to the power of the number of digits. For instance, take the number 371. It has 3 digits, hence, we have to check if the sum of cube of each digit is equal to 371 or not. 33 = 27 73 = 343 13 = 1 On adding them, we get: 27 + 343 + 1 = 371 Hence, 371 is an armstrong number. Find whether the given number is an Armst
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start