题解 | #牛牛的四叶玫瑰数#
牛牛的四叶玫瑰数
http://www.nowcoder.com/practice/b1ee23676ad54919b50aa1a09da1704e
#include<math.h>
int main() {
int l, r;
scanf("%d %d", &l, &r);
for (int i = l; i <= r; i++) {
int val = i, temp = 0;
while (val) {
temp += pow(val % 10, 4);
val /= 10;
}
if (temp == i) printf("%d ", i);
}
return 0;
}