js查询自幂数
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
for(var num=100;num<1000;num++){
var a=parseInt(num/100);
var b=num%10
var c=parseInt(num/10)%10
if(a*a*a+b*b*b+c*c*c===num){
console.log(num+'是自幂数')
}
}
</script>
</body>
</html>