How to resolve the algorithm Own digits power sum step by step in the Pascal programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Own digits power sum step by step in the Pascal programming language

Table of Contents

Problem Statement

For the purposes of this task, an own digits power sum is a decimal integer which is N digits long and is equal to the sum of its individual digits raised to the power N.

The three digit integer 153 is an own digits power sum because 1³ + 5³ + 3³ = 1 + 125 + 27 = 153.

Find and show here all own digits power sums for N = 3 to N = 8 inclusive. Optionally, do the same for N = 9 which may take a while for interpreted languages.

Let's start with the solution: