文章
34
粉丝
316
获赞
10
访问
22.3k
#include<stdio.h>
#include<math.h>
int Judge(int x)
{
int temp = x;
if ((int)pow(x / 100, 3) + (int)pow(x % 100 / 10, 3) + (int)pow(x % 10, 3) == temp)return 1;
return 0;
}
int main()
{
int m, n;
scanf("%d %d", &m, &n);
while (m != 0 || n != 0) {
int result = 0;
for (int i = m; i < n + 1; i++)
if (Judge(i)) {
result++;
printf("%d ", i);
};
if (result == 0)printf("no\n");
else printf("\n")...
登录后发布评论
暂无评论,来抢沙发