Check Narcissistic Number Problem

Check Narcissistic Number Problem — ExecCode School DSA Practice

Solve the Check Narcissistic Number problem on ExecCode. Free online school DSA practice in Math. Write and run code in Java, C++, Python — no signup required to run.

Problem description

You are given a number. Your task is to first, count how many digits are in this number. Next, take each digit by itself and multiply it by itself that many times.

Examples

Input 1; Output True. Input 153; Output True

Constraints

1 <= n <= 10^5

Practice Check Narcissistic Number free on ExecCode. Browse DSA problems, topic map, and placement guides.