for (int i = 100; i <=999; i++)
{
int a = i / 100 % 10;
int b = i / 10 % 10;
int c = i % 10;
if (a * a * a + b * b * b + c * c * c == i)
{
Console.WriteLine(i);
}
}
原文地址:https://www.cnblogs.com/-Ellen/p/9865690.html
时间: 2024-10-07 23:39:13