#K69312. Armstrong Numbers Finder
Armstrong Numbers Finder
Armstrong Numbers Finder
In this problem, you are given an integer n representing the number of digits. Your task is to find and print all n-digit Armstrong numbers. A number is called an Armstrong number (or narcissistic number) if the sum of its digits each raised to the power n is equal to the number itself. For example, when n = 3, the Armstrong numbers are 153, 370, 371, and 407 because:
[ 153 = 1^3 + 5^3 + 3^3, ]
If no Armstrong numbers exist for the given number of digits, output an empty line.
inputFormat
The input is provided via standard input (stdin) and consists of a single integer n — the number of digits to consider.
outputFormat
The output should be printed to standard output (stdout) in one line. Print all n-digit Armstrong numbers in ascending order separated by a single space. If there are no such numbers, print an empty line.
## sample3
153 370 371 407