Feedback | If you notice incorrect translations in Contester, please let author know.
|
|
Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb. Prepared by Ibrahim Mesecan.
Difficulty Alpha
Armstrong Numbers
Shqip
Number 153 has 3 digits and if you take the 3rd power of every digit and calculate the sum of them, you will have the same number again.
153 = 13 + 53 + 33
= 1 + 125 + 27 = 153
Thus for 1634 you should take the fourth powers of every digit (because the number has 4 digits) and calculate the sum.
If the sum is equal to the number itself then we say that this number is an Armstrong Number.
Input specification
There will be two numbers between
1 < n < m ≤ 100000.
Output specification
Between the given numbers, show the Armstrong Numbers (if there is any).
If there are several numbers show them separated by spaces.
Otherwise print "No" (without double quotations) followed by an endline.
Input I b>
td>
|
Input II b>
td>
|
100 200
td>
|
1000 2000
td>
|
Output 1 b> td>
| Output 2 b> td>
tr>
153
td>
|
1634
td> | |
Для отправки решений необходимо выполнить вход.
|