387. Find Armstrong Numbers

0

Medium

Given two numbers, N1 and N2, write a function that finds and prints all Armstrong numbers between N1 and N2 (inclusive). An Armstrong number is a number that is equal to the sum of its own digits each raised to the power of the number of digits. For example, 371 is an Armstrong number because 3^3 + 7^3 + 1^3 = 371.

Input Format

Output Format

Example

Input

400 1000

Output

407

Constraints

0 < N1 < 100 N1 < N2 < 10000
Loading...

View Submissions

Console