Home >Backend Development >PHP Tutorial >Find the number of three-digit daffodils in php
In C language, when it comes to algorithms, one of the questions is to find the three-digit "narcissus number". So what is the "narcissus number"? The daffodil number is a number with n (>=3) digits, which is equal to the sum of the n powers of each number. For example, 153 is a daffodil number, 153=1*1*1+5*5* 5+3*3*3; Example 1, find the three-digit fairy number in C language.
Example 2, an example of finding the number of daffodils in PHP.
|