<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> </head> <body> </body> </html> <script type="text/javascript"> for(i=100;i<1000;i++){ var a = parseInt(i%10); var b = parseInt((i/10)%10); var c = parseInt(i/100); if(a*a*a+b*b*b+c*c*c==i){ document.write(i + "水仙花数"+"<br/>"); } } </script>
原文地址:https://www.cnblogs.com/hankai2735/p/8776473.html
时间: 2024-10-10 16:31:08