>>> sum([int(i) for i in str(2**1000)])
1366
>>>

project euler 16:Power digit sum的更多相关文章

  1. (Problem 16)Power digit sum

    215 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of th ...

  2. Project Euler 92:Square digit chains 平方数字链

    题目 Square digit chains A number chain is created by continuously adding the square of the digits in ...

  3. Project Euler 90:Cube digit pairs 立方体数字对

    Cube digit pairs Each of the six faces on a cube has a different digit (0 to 9) written on it; the s ...

  4. Python练习题 047:Project Euler 020:阶乘结果各数字之和

    本题来自 Project Euler 第20题:https://projecteuler.net/problem=20 ''' Project Euler: Problem 20: Factorial ...

  5. Python练习题 044:Project Euler 016:乘方结果各个数值之和

    本题来自 Project Euler 第16题:https://projecteuler.net/problem=16 ''' Project Euler 16: Power digit sum 2* ...

  6. Python练习题 048:Project Euler 021:10000以内所有亲和数之和

    本题来自 Project Euler 第21题:https://projecteuler.net/problem=21 ''' Project Euler: Problem 21: Amicable ...

  7. Python练习题 045:Project Euler 017:数字英文表达的字符数累加

    本题来自 Project Euler 第17题:https://projecteuler.net/problem=17 ''' Project Euler 17: Number letter coun ...

  8. Python练习题 042:Project Euler 014:最长的考拉兹序列

    本题来自 Project Euler 第14题:https://projecteuler.net/problem=14 ''' Project Euler: Problem 14: Longest C ...

  9. Python练习题 041:Project Euler 013:求和、取前10位数值

    本题来自 Project Euler 第13题:https://projecteuler.net/problem=13 # Project Euler: Problem 13: Large sum # ...

随机推荐

  1. Linux iostat监测IO状态(转)

    Linux iostat监测IO状态 2010-03-1  |  13:13分类:Linux,技术细节  |  标签:Linux  |  53,945 views Linux系统出现了性能问题,一般我 ...

  2. BZOJ 1063 道路设计NOI2008

    http://www.lydsy.com/JudgeOnline/problem.php?id=1063 题意:给你一棵树,也有可能是不连通的,把树分成几个链,求每个点到根经过的最大链数最小,而且要输 ...

  3. qsort的另类玩法,无聊写着耍耍

    #include <stdio.h>#include <stdlib.h>char cmp_shellcode[] = "\x55" "\x89\ ...

  4. Intent.ACTION_TIME_TICK 广播

    Intent.ACTION_TIME_TICK 广播需要动态注册,不能在清单文件配置. TimeReceiver mBroadcastReceiver = new TimeReceiver(); In ...

  5. hdr(host), hdr_beg(host) , path_beg

    ACL derivatives : hdr([<name>[,<occ>]]) : exact string match 字符串精确匹配 hdr_beg([<name&g ...

  6. nodejs学习笔记之网络编程

    了解一下OSI七层模型   OSI层 功能 TCP/IP协议 应用层 文件传输,电子邮件,文件服务,虚拟终端  TFTP,HTTP,SNMP,FTP,SMTP,DNS,Telnet 表示层 数据格式化 ...

  7. pyqt QTableWidget例子学习(重点)

    # -*- coding: utf-8 -*- # python:2.x __author__ = 'Administrator' from PyQt4.QtGui import * from PyQ ...

  8. iOS ARC注释和错误的解决方法在使用

    1.一个错误The current deployment target does not support automated __weak references 这个错误被所述支持iOS版本号不支持相 ...

  9. 文章转载至CSDN社区罗升阳的安卓之旅,原文地址:

    文章转载至CSDN社区罗升阳的安卓之旅,原文地址:http://blog.csdn.net/luoshengyang/article/details/6720261 前面我们在分析Activity启动 ...

  10. LR使用Java User协议环境报错Please add the <JDK>\bin to the path and try again

    看标题报错信息就知道,这是java编译及运行环境配置问题,运行LR脚本时,LR代理找不到java的JDK环境,当然,可能有人会遇到说,我在cmd窗口javac 环境是没问题的呀,是的,这就要看你的jd ...