“Strange” numbers

A positive number >0> 0 is “strange” if when adding each of its digits raised to the number of digits that make it up, we obtain the number itself.

For example, 153 (which has three digits) is “strange”, 153=13+53+33153 = 1^{3} + 5^{3} + 3^{3}

Make a program that reads a positive integer and checks if it is "strange" or not.

Input

A positive integer >0> 0 and <10000< 10000

Output

Prints the input number and says if it is a “strange” number or not

Observation

It is forbidden to use any external function except, cin and cout, and also the program must be well documented if not it will be invalidated.

Problem information

Author: PRO1

Generation: 2026-01-25T21:34:53.435Z

© Jutge.org, 2006–2026.
https://jutge.org