public class what {
public static void flower() {
int sum=0;
for(int i=100;i<1000;i++){
int a=i/100;int b=(i/10)%10;int c=i%10;
if(i==Math.pow(a,3)+Math.pow(b,3)+Math.pow(c,3))
{
System.out.println(i);
}
}
}
public static void main(String[] args) {
flower();
{
System.out.println( );
}
}
}
1到1000的水仙花数
最新推荐文章于 2024-01-06 16:38:08 发布