### Bluebook

## Digits and Sums

Write a program that will find all the three-digit natural numbers that are equal to the sum of the cubes of their digits. The range of number will be 100 ≤ M ≤ N ≤ 999. The input will be two numbers: M and N where M is the lesser 3 digit number and N is the greater 3 digit number.

### Sample Input

100 200

### Sample Output

153

Explanation of output: For example, the number 153 = 1*1*1 + 5*5*5 + 3*3*3, therefore it should be outputted.

All Submissions

Best Solutions

**Point Value:** 3

**Time Limit:** 2.00s

**Memory Limit:** 16M

**Added:** Oct 26, 2008

**Languages Allowed:**

C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3

## Comments (Search)

omniwarkingon Dec 13, 2013 - 8:36:25 pm UTC What is wrong?XZNZon Nov 15, 2011 - 4:01:03 am UTC what is wrong?Test case #2: Wrong Answer [0.080s, 2.6M] (0/10)

hint plz!

jargonon Nov 15, 2011 - 4:36:19 am UTC Re: what is wrong?That's not what your program's doing -- reread the question and then look at your if statement.

purohit3105on Nov 27, 2008 - 11:55:32 pm UTC what are we suppose to output?Your Output:

------------------------------------

------------------------------------

for two of the cases....

can someone help?

hansonw1on Nov 28, 2008 - 12:03:20 am UTC Re: what are we suppose to output?The problem is that you're reading the input wrong - notice that the two numbers are on the same line.

purohit3105on Nov 28, 2008 - 12:31:12 am UTC Re: Re: what are we suppose to output?purohit3105on Nov 23, 2008 - 11:15:41 pm UTC wht is wrong why does it not accept my program?if there are no numbers; what are we supppose to output?

bbi5291on Nov 28, 2008 - 12:04:03 am UTC Re: wht is wrong why does it not accept my program?