#C5983. Armstrong Number Checker
Armstrong Number Checker
Armstrong Number Checker
An Armstrong Number (also known as a narcissistic number) is a number that is equal to the sum of its own digits each raised to the power of the number of digits. Mathematically, a number \(n\) with \(p\) digits is an Armstrong Number if:
\(n = d_1^p + d_2^p + \cdots + d_p^p\)
Your task is to determine whether a given integer is an Armstrong Number. If it is, print 1
; otherwise, print 0
.
inputFormat
The input consists of a single integer (n) provided via standard input.
outputFormat
Output a single integer on standard output: 1
if (n) is an Armstrong Number, otherwise 0
.## sample
153
1