2013春季SD高校ACM周赛9(SDUT) -b

这是一篇关于2013年春季SD高校ACM周赛中的一道编程题目的解析。题目要求处理1,000,000位数字的移位和借位操作,需要注意不要误解为小于1,000,000的整数。解决方法是使用字符串处理技术来完成数字的移位和借位操作。" 139532398,7592826,理解UG NX二次开发:确保目录存在,"['NX二次开发', 'UG二次开发', 'C++', '嵌入式硬件', 'API']
摘要由CSDN通过智能技术生成

Hide That Number

Time Limit: 1000MS    Memory limit: 65536K

题目描述

According to Wikipedia, Cryptography is “the practice and study of hiding information” and this is exactly what Alex is looking for. Ever since he was a kid, Alex was paranoid over someone laying their hands on his phone book. He decided that he must write the numbers in some secret way that only he can decipher. At first he tried quite complex algorithms, but that slowed him down when he needed to dial a number fast. He finally came up with the following algorithm: Rather than writing down the number itself, Alex would shift the number one place to the left (as if multiplying it by 10,) then adding the shifted number to the original. For example, if the phone number was 123, Alex would add 1230 to it, resulting in 1353. To make what he writes looks as a regular phone number, Alex truncates the result (from the left,) so that i
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值