心如止水

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2011年8月17日

摘要: 参考自:http://www.cnblogs.com/herbert/archive/2011/02/13/1953943.htmlProject Euler problem 16215 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 21000? 计算 2 的 1000次方的所有数字的和?这个设计大数乘方问题,通用的思路就是采用数组来分段处理大数,分段表示大数。下面的算法中,我采用的是“万进制”,用数组来存储数据。原理如下: 先说计 阅读全文
posted @ 2011-08-17 16:35 cutebear 阅读(1277) 评论(0) 推荐(0) 编辑