博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
PTA_Have fun with numbers(C++)
阅读量:6859 次
发布时间:2019-06-26

本文共 659 字,大约阅读时间需要 2 分钟。

 

 

1 #include
2 #include
3 using namespace std; 4 int main() 5 { 6 int z=0; 7 char fir[20]="0"; 8 int sec[20]={
0},thi[20]={
0},fo[21]={
0}; 9 int len=0;10 cin>>fir;11 len=strlen(fir);12 int len2=len;13 for(int i=0;i
0;i--) 16 {17 thi[i]=2*sec[i]+z;18 z=thi[i]/10;19 thi[i]%=10;20 }21 int t=thi[i];22 23 thi[i]=2*sec[i]+z;24 if(t>=10) 25 {26 len2++;27 thi[i]=2*sec[i]+z;28 fo[0]=thi[i]/10 ;29 thi[i]%=10;30 for(int j=0;j

 

转载于:https://www.cnblogs.com/Yethon/p/10460168.html

你可能感兴趣的文章
修改Discuz! X2文章标题字数限制为255
查看>>
【HDOJ】2102 A计划
查看>>
利用p4实现ipv6转发实验
查看>>
UiPath实践经验总结(二)
查看>>
分页---总结
查看>>
触屏网页设计初探 (二) - [移动开发]
查看>>
前端开发的历史和趋势(转摘阮一峰)
查看>>
Ubuntu 削减非 LTS 支持周期
查看>>
_实用的cms企业后台管理模板
查看>>
菜鸟看Redis(一)
查看>>
matplotlib.pyplot.plot()参数详解
查看>>
||PHP||关于=>和->以及::的用法
查看>>
最短路径问题
查看>>
Yii2中定义自己的Widget
查看>>
Aforge.net识别简易数字验证码问题
查看>>
JVM系列二:GC策略&内存申请、对象衰老
查看>>
MySQL 数据库备份策略:全备与增量备份
查看>>
Springboot的热部署
查看>>
Thinking in UML-1-为什么需要UML
查看>>
vs编译obj给delphi用
查看>>