HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Functions > problem:


160. 50571 - Armstrong Numbers - 2

Guest
• Discussion of problem (1)

Volume problems

• 130. 50652 - Prime Factorization
• 132. 50474 - Sum of Two Primes
• 135. 50572 - Palindromic Numbers
• 140. 50393 - Palindromic Numbers
• 145. 50586 - Prime Palindromes
• 148. 50412 - K numbers
• 150. 50375 - Area of Circles
• 160. 50388 - Number of Armstrong ...
• 160. 50571 - Armstrong Numbe...
• 165. 50577 - Perfect Numbers and ...
• 190. 50533 - Contacts List
• 200. 50454 - What day is it?
• 210. 50369 - Base Conversion
• 250. 50385 - The 3n + 1 problem
• 260. 50493 - n-digit kth Prime Number

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 Input II
100 200 1000 2000
Output 1 Output 2
153
1634

Для отправки решений необходимо выполнить вход.

www.contester.ru