标签:spec href iss turn strong for pre 输出 ++
http://lx.lanqiao.cn/problem.page?gpid=T46
代码:
#include <bits/stdc++.h>
using namespace std;
int isSpecial(int x) {
int sum = 0;
while(x) {
int t = x % 10;
sum += t * t * t;
x /= 10;
}
return sum;
}
int main() {
for(int i = 100; i <= 999; i ++) {
if(isSpecial(i) == i)
printf("%d\n", i);
}
return 0;
}
FH
标签:spec href iss turn strong for pre 输出 ++
原文地址:https://www.cnblogs.com/zlrrrr/p/10467969.html