for (var i = 100; i<= 999; i++){

    var ge = i % 10;
    shi = parseInt(i / 10) % 10;
    bai = parseInt(i / 100);
    var sum = ge * ge * ge + shi * shi * shi + bai * bai * bai ;

    if(sum == i){
        console.log(sum);

    }

}


2023-06-28T13:20:26.png