>>> 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. Python Set集合,函数,深入拷贝,浅入拷贝,文件处理

    1.Set基本数据类型 a.set集合,是一个无序且不重复的元素集合 class set(object): """ set() -> new empty set o ...

  2. 配置Kestrel 网址Urls

    配置Kestrel 网址Urls ASP.NET Core中如何配置Kestrel Urls呢,大家可能都知道使用UseUrls() 方法来配置. 今天给介绍全面的ASP.NET Core 配置 Ur ...

  3. Python 购物车---之商家部分

    知识点:文件写入操作, 函数, 函数递归 #!C:\Program Files\Python35/bin # -*- conding:utf-8 -*- # author: Frank # 定义商品列 ...

  4. spark提交任务的流程

    1.spark提交流程 sparkContext其实是与一个集群建立一个链接,当你停掉它之后 就会和集群断开链接,则属于这个资源的Excutor就会释放掉了,Driver 向Master申请资源,Ma ...

  5. 正则匹配<img src="xxxxxx" alt="" />标签的相关写法

    1.(<img\ssrc[^>]*>) 2.content.replace(/<img [^>]*src=['"]([^'"]+)[^>]*&g ...

  6. Core Data (二)备

    序 上次只是说了三个Core Data栈基本类.这次准备介绍一下常用的类. NSManagedObject Core Data是一次底层数据封装成面向对象的技术.最直接的表现就是在SQLite里面的一 ...

  7. extern "c"用法

    在Windows驱动开发中,如果是使用C++开发的,那么必须在有些关键函数钱加extern c 的关键词,否则编译出来的函数,跟C语言编译的函数不同,导致驱动程序不能 被有效识别. 最关键的是Driv ...

  8. Hdu3498-whosyourdaddy(精确覆盖模板题)

    Problem Description sevenzero liked Warcraft very much, but he haven't practiced it for several year ...

  9. Hdu5381-The sum of gcd(莫队)

    题意我就不说了   解析: 莫队,先预处理出以i为右端点的区间的gcd值,有一些连续的区间的gcd值是相同的,比如[j,i],[j+1,i],[j+2,i]的gcd值是相同的,我们可以把[j,j+2] ...

  10. <转载>构造函数与拷贝构造函数

    原文地址http://www.cnblogs.com/waynelu/archive/2012/07/01/2572264.html 构造函数 构造函数.析构函数与赋值函数是每个类最基本的函数. 对于 ...