HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Arithmetic > problem:


50571 - Armstrong Numbers - 2

Guest
• Discussion of problem (1)

Section problems

• 51031 - Convert from Hex to Dec
• 51030 - Number of Right Triangles
• 50553 - Divisible by m
• 50554 - nth power of m
• 50557 - nth Power of m (Long Multiply)
• 50559 - Prime Factors of a Number
• 50565 - Binary numbers
• 50568 - Body Mass Index Calculator
• 50571 - Armstrong Numbers - 2
• 50572 - Palindromic Numbers
• 50574 - Triangular Numbers
• 50578 - Mersenne prime
• 50579 - Pentagonal Numbers
• 50581 - The roots of a quadratic eq...
• 50582 - Number of digits
• 50583 - Max of 3 numbers
• 50584 - Total invoice amount

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