[Java]
Public static void main (String [] args ){
Int num = 0;
System. out. println ("the number of daffodils within 1000 is :");
For (int I = 100; I <1000; I ++ ){
If (I = (I/100) * (I/100) * (I/100) + (I/10% 10) * (I/10% 10) * (I/10% 10) + (I % 10) * (I % 10) * (I % 10 )){
Num = I;
System. out. println (num );
}
}
}
Public static void main (String [] args ){
Int num = 0;
System. out. println ("the number of daffodils within 1000 is :");
For (int I = 100; I <1000; I ++ ){
If (I = (I/100) * (I/100) * (I/100) + (I/10% 10) * (I/10% 10) * (I/10% 10) + (I % 10) * (I % 10) * (I % 10 )){
Num = I;
System. out. println (num );
}
}
} Popular Science:
The number of daffodils is only a kind of self-Power. Strictly speaking, the self-power of three numbers is the number of daffodils.
Appendix: name of the Self-power of other digits
One-digit self-Power: no three-digit self-Power: daffodils four-digit self-Power: Four-leaf rose five-digit self-power: five-star number six-digit self-Power: six-digit seven-digit self-Power: Big Dipper number eight-digit self-Power: Eight Immortals number nine-digit self-Power: nine Chongyang number ten-digit self-power: tens of thousands
The number of common daffodils is also known as the number of Armstrong.
There are 4 daffodils in three places: 153,370,371,407;
There are three daffodils in four places: 1634,8208, 9474; three daffodils in five places: 54748,92727, 93084; only one daffodils in six places: 548834; there are 4 daffodils in seven places: 172.1625,422.1618, 9800817,9926315; there are 3 daffodils in eight places: 24678050,24678051, 88593477
Author: a125138