<pre name="code" class="java"><pre name="code" class="java"><pre name="code" class="java">public class test1{
public static void main(String[] args)
{
int x,y,m,z,i=0;
int [] a=new int[8];
for(m=100;m<1000;m++)
{
x=m/100;
y=m/10-x*10;
z=m%10;
if(x*100+y*10+z==x*x*x+y*y*y+z*z*z )
{
a[i]=m;
i++;
}
}
for(x=0;x<i;x++)
System.out.println(a[x]);
}
/*
153
370
371
407
请按任意键继续. . .
*/
}