题解 | #牛牛的四叶玫瑰数#
牛牛的四叶玫瑰数
https://www.nowcoder.com/practice/b1ee23676ad54919b50aa1a09da1704e
#include <stdio.h>
#include <math.h>
int main()//水仙花数,各数字计算
{
int n, m;
scanf("%d %d", &n, &m);
for (int i = n; i <= m; i++)
{
int w = 0, temp = 0, te = i;
while (te)
{
temp = te % 10;//个位
w += pow(temp, 4);
te /= 10;//减一位
}
if (w == i)
printf("%d ", i);
}
return 0;
}

