BlueBook - Digits and Sums

View as PDF

Submit solution

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

Problem types
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 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

153

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.


Comments


  • 0
    fireheartjerry  commented on Jan. 23, 2023, 11:41 p.m.

    If there are multiple answers, separate them with a newline ('\n' in most languages).