PTA A1023 Have Fun with Numbers :两个注意点

注意点一

看清楚题意!
看清楚题意!
看清楚题意!

Double it we will obtain 246913578, which happens to be another 9-digit number consisting exactly the numbers from 1 to 9, only in a different permutation. Check to see the result if we double it again!

意思是:乘上两倍后,数的位数不变,并且仍然由原来的数字组成,只不过是排列组合罢了。

注意点而

乘法和加法都需要有最后的进位处理。
只不过加法的进位只有一个,而乘法不是,需要通过while循环,逐个往前位进。

发布了146 篇原创文章 · 获赞 42 · 访问量 5万+

猜你喜欢

转载自blog.csdn.net/SmartLoveyu/article/details/95660230