Here is the translation of the programming task text from Russian to English: Armstrong numbers in a range

C# Medium math

Task «Here is the translation of the programming task text from Russian to English: Armstrong numbers in a range»

Write a program that finds all Armstrong numbers in a given range from A to B inclusive. An Armstrong number is a number that equals the sum of its digits raised to the power of the number of digits in that number. For example, 153 = 1^3 + 5^3 + 3^3. It is guaranteed that A ≤ B and both numbers are positive and do not exceed 100000.

Input Format

Two integers A and B, separated by a space.

Output Format

All Armstrong numbers in the range [A, B], each on a new line. If there are no such numbers, output the string "No Armstrong numbers".

Examples

Example 1

INPUT
1 200
OUTPUT
1 2 3 4 5 6 7 8 9 153

Example 2

INPUT
3 1 3 5 4 2 4 6 8 number
OUTPUT
No Armstrong numbers

Example 3

INPUT
100 1000
OUTPUT
153 370 371 407

Example 4

INPUT
2 apple banana 3 cherry date elderberry string
OUTPUT
apple banana cherry date elderberry

Example 5

INPUT
500 900
OUTPUT
No Armstrong numbers
main.cs