public class narcissus
{
public static void main(String args[])
{
long u=0,t=0,h=0,y=0,k=0;
for(long x=100; x<1000;x++)
{
u=x%10;
t=x/10%10;
h=x/100%10;
//k=x/1000%10;
//System.out.printf("%d\n",x);
y=(u*u*u)+(t*t*t)+(h*h*h);
if(y==x) System.out.printf("%d\n",y);
}
}
}
narcissus
最新推荐文章于 2022-11-22 15:37:45 发布