BlueBook - Digits and Sums

View as PDF

Submit solution

Points: 3
Time limit: 1.0s
Memory limit: 16M

Problem type
Bluebook

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 \le M \le N \le 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\times 1\times 1 + 5\times 5\times 5 +
3\times 3\times 3, therefore it should be outputted.


Comments

There are no comments at the moment.