Problem 2491. Dudeney Numbers: Numbers which are the cube of their decimal sum

From Wikipedia: A Dudeney number is a positive integer that is a perfect cube such that the sum of its decimal digits is equal to the cube root of the number.

For example:




Write a function that returns true if a number is a Dudeney number and false otherwise.

Assume all numbers are of base 10.

If a number is negative, assume that only the leading digit carries the negative sign e.g. -4913 -> (-4+9+1+3)^3

Solution Stats

75.51% Correct | 24.49% Incorrect
Last Solution submitted on May 05, 2020

Solution Comments

Problem Recent Solvers30

Suggested Problems

More from this Author9

Problem Tags