标签:char ++i clu pair ace 特殊 mes return lin
#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef pair<int,int> P;
const int N=35;
const double PI=acos(-1);
#define line ‘\n‘
#define gt getchar()
#define mid ((L+R)>>1)
int read(){int x=0,op=1;char c=gt;while(!isdigit(c)){if(c==‘-‘)op=-1;c=gt;}while(isdigit(c))x=x*10+c-48,c=gt;return x*op;}
int judge(int x)
{
int sum=0;
while(x)sum+=(x%10)*(x%10)*(x%10),x/=10;
return sum;
}
int main()
{
for(int i=100;i<=999;++i)if(judge(i)==i)cout<<i<<line;
return 0;
}
标签:char ++i clu pair ace 特殊 mes return lin
原文地址:https://www.cnblogs.com/ZeroOne-World/p/12706627.html