<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>水仙花</title>
<script type="text/javascript">
for (var i = 100 ; i <= 1000; i++) {
var b = parseInt(i/100);
var s = parseInt((i-b*100)/10);
var g = i%10;
if(b**3 + s**3 + g**3 == i){
alert(i)
}
}
</script>
</head>
<body>
</body>
</html>
网友评论