projecteuler---->problem=16----Power digit sum
2014-06-03 15:47
483 查看
215 = 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?
翻译:
215 = 32768的各位数之和为3 + 2 + 7 + 6 + 8 = 26。
那么21000的各位数之和为……?
What is the sum of the digits of the number 21000?
翻译:
215 = 32768的各位数之和为3 + 2 + 7 + 6 + 8 = 26。
那么21000的各位数之和为……?
import math m=pow(2,1000) s=0 while m>0: s+= m%10 m /= 10 print s
相关文章推荐
- projecteuler---->problem=20----Factorial digit sum
- ProjectEuler-Problem 16-Power digit sum
- Project Euler:Problem 16 Power digit sum
- Problem 16:Power digit sum
- projecteuler---->problem=25----1000-digit Fibonacci number
- Problem 16:Power digit sum
- projecteuler---->problem=30----Digit fifth powers
- projecteuler---->problem=18----Maximum path sum I
- Problem 16 Power digit sum (高精度幂)
- projecteuler---->problem=33----Digit canceling fractions
- Problem 16 Power digit sum
- Project Euler Problem 16 Power digit sum
- projecteuler---->problem=6----Sum square difference
- projecteuler---->problem=19----Counting Sundays
- projecteuler---->problem=22----Names scores
- Linux-world-2012-January->16(mini2440 uboot201103 系统移植)->3(machine ID problem)
- projecteuler---->problem=15----Lattice paths
- projecteuler---->problem=14----Longest Collatz sequence
- projecteuler---->problem=28----Number spiral diagonals
- projecteuler---->problem=21----Amicable numbers