JAVA Study Notes-Daffodils

Source: Internet
Author: User

[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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.