Four digit Armstrong numbers
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Four digit number is called Armstrong number if the sum of fourth power of its digits equals to the number. For example, 8208 = 8^4
+ 2^4
+ 0^4
+ 8^4
is an Armstrong number. Print all Armstrong numbers from a to b.
Input
Two integers a and b (1000 ≤ a ≤ b ≤ 9999).
Output
Print in one line all Armstrong numbers from a to b.
Examples
Input #1
Answer #1
Submissions 13K
Acceptance rate 49%