请填写该数字,不要填写任何多余的内容或说明性的文字。
代码:
public class Sixlifangbianzishen {public static void main(String[] args) {int count=0;for(int i=1;i<10000;i++){int temp=0; //temp定义为局部变量,是因为每次比较都需要temp回0,而不是不断地累加int n=i*i*i;while(n!=0){temp=temp+n%10;n=n/10;}if(temp==i)count++;}System.out.PRintln(count);}}
新闻热点
疑难解答