BlueBook - Digits and Sums

View as PDF

Submit solution

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

Problem types

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 numbers 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


Explanation for Sample Output

For example, the number 153 = 1\times 1\times 1 + 5\times 5\times 5 + 3\times 3\times 3 should be outputted.


There are no comments at the moment.