上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 13 下一页
摘要: 列表解析 列表解析总共有两种形式: 1. [i for i in range(k) if condition]:此时if起条件判断作用,满足条件的,将被返回成为最终生成的列表的一员。 2. [i if condition else exp for exp]:此时if...else被用来赋值,满足条件 阅读全文
posted @ 2019-07-03 19:12 no樂on 阅读(468) 评论(0) 推荐(0) 编辑
摘要: 托普利茨矩阵 阅读全文
posted @ 2019-07-02 12:21 no樂on 阅读(391) 评论(0) 推荐(0) 编辑
摘要: 三角形图形 阅读全文
posted @ 2019-07-02 11:41 no樂on 阅读(350) 评论(0) 推荐(0) 编辑
摘要: 字母金字塔 阅读全文
posted @ 2019-07-02 11:13 no樂on 阅读(843) 评论(0) 推荐(0) 编辑
摘要: 二进制求和 给定两个二进制字符串,返回他们的和(用二进制表示)。 输入为非空字符串且只包含数字 1 和 0。 示例 1: 输入: a = "11", b = "1"输出: "100"示例 2: 输入: a = "1010", b = "1011"输出: "10101" 来源:力扣(LeetCode) 阅读全文
posted @ 2019-06-30 13:57 no樂on 阅读(828) 评论(0) 推荐(0) 编辑
摘要: power函数 阅读全文
posted @ 2019-06-30 09:16 no樂on 阅读(3025) 评论(0) 推荐(0) 编辑
摘要: 求幂 二的幂次方都有一个特点,这些数字的二进制数都只会出现一个1,跟着几个0。 而四的幂次方则相似,不过它们的二进制数中0只会出现偶数次、而不是奇数次。 阅读全文
posted @ 2019-06-28 14:49 no樂on 阅读(321) 评论(0) 推荐(0) 编辑
摘要: Problem 63 https://projecteuler.net/problem=63 Powerful digit counts The 5-digit number, 16807=75, is also a fifth power. Similarly, the 9-digit numbe 阅读全文
posted @ 2019-06-20 18:11 no樂on 阅读(180) 评论(0) 推荐(0) 编辑
摘要: Problem 56 https://projecteuler.net/problem=56 Powerful digit sum A googol (10100) is a massive number: one followed by one-hundred zeros; 100100 is a 阅读全文
posted @ 2019-06-20 17:57 no樂on 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 查找常用字符 https://leetcode-cn.com/problems/find-common-characters/ 给定仅有小写字母组成的字符串数组 A,返回列表中的每个字符串中都显示的全部字符(包括重复字符)组成的列表。例如,如果一个字符在每个字符串中出现 3 次,但不是 4 次,则需 阅读全文
posted @ 2019-06-17 19:48 no樂on 阅读(198) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 13 下一页