当前位置:网站首页>Daffodil upgrade (self idempotent)
Daffodil upgrade (self idempotent)
2022-06-13 08:10:00 【Stupid little bird learning code】
// Self idempotent
int main()
{
int i = 0;
for(i=0;i<100000;i++)
{
// Judge whether it is self idempotent
//1. Calculate the number of digits n digit
int n = 1;
int sum = 0;
int tmp = i;
while(tmp/=10)
{
n++;
}
//2. Calculation i Everyone's n The sum of the powers
tmp = i;
while(tmp)
{
sum += pow(tmp%10,n);// Power number
tmp/=10;
}
//3. Compare i and sum
if(i==sum)
{
printf("%d ",sum);
}
}
return 0;
} 边栏推荐
- 【博弈论-完全信息静态博弈】 Nash均衡的应用
- EHD ether coin, the hottest dpoc mining project
- 有什么好的管理软件来解决茶叶批发商面临的难题
- 24 | adventure and prediction (III): thread pool in CPU
- 2022年危险化学品经营单位安全管理人员特种作业证考试题库及模拟考试
- 星巴克创始人:出于安全考量 或不再向非店内消费者开放“公厕”
- Detailed explanation of digital certificate and Ca
- 直播回顾 | 积极防御体系下BAS技术创新探索
- Cosmos Starport installation and startup
- Selenium foundation API
猜你喜欢

Advanced MySQL: how to learn MySQL source code

ERP basic data Kingdee

实践出真知--你的字节对齐和堆栈认知可能是错误的

Edge浏览器使用BdTab新标签页插件(BD新标签页)

Did decentralized digital identity
将solidworks建的机器人模型导入到ros中

免费文件服务器储存技术
![[redis problem] record a big key problem handling](/img/ad/787d5911fac2cc2105e439d906b67f.jpg)
[redis problem] record a big key problem handling

2022年危险化学品经营单位安全管理人员特种作业证考试题库及模拟考试

Give code vitality -- the way to read code neatly
随机推荐
Common shell script development specifications
ERP基础数据 金蝶
CCNP_ BT static routing
18 | establish data path (middle): instruction + operation =cpu
Idea shortcut summary
赋予代码生命力--读代码整洁之道
ERP基础数据 华夏
[MySQL] rapid data deletion recovery tool - binlog2sql
24 | adventure and prediction (III): thread pool in CPU
Plane merging (matlab)
【PYTORCH】Expected object of type torch. xxxTensor but found type torch. cuda. xxxTensor(torch0.4.0)
17 | 建立数据通路(上):指令+运算=CPU
ES6 deleting an attribute of an object
Create a substrate private network
2022起重机械指挥考试题模拟考试题库及在线模拟考试
有什么好的管理软件来解决茶叶批发商面临的难题
Amino encoding protocol
Dfinity (ICP) deployment and development-2
杨氏矩阵查找数字是否存在
Remote office solution under epidemic situation