favorite We need a little bit of your help to keep things running, click on this banner to learn more

Week 3: November 23 – 29. For Loop. Part 2

Four digit Armstrong numbers

Four digit number is called Armstrong number if the sum of fourth power of its digits equals to the number. For example, 8208 = 84 + 24 + 04 + 84 is an Armstrong number. Print all Armstrong numbers from a to b.


Two integers a and b (1000ab9999).


Print in one line all Armstrong numbers from a to b.

Time limit 1 second
Memory limit 128 MiB
Input example #1
1000 3000
Output example #1