python刷题
文章平均质量分 61
白的对
人生在世,除了修行,别无他路。
展开
-
LeetCode-Python-560. 和为K的子数组
LeetCode-Python-560. 和为K的子数组一、题目的内容示例 1 :说明 :二、解题思路第1个实现的写法第2个实现的写法一、题目的内容力扣里面的560题目:给定一个整数数组和一个整数 k,你需要找到该数组中和为 k 的连续的子数组的个数。示例 1 :输入:nums = [1,1,1], k = 2输出: 2 , [1,1] 与 [1,1] 为两种不同的情况。说明 :数组的长度为 [1, 20,000]。数组中元素的范围是 [-1000, 1000] ,且整数 k 的范围是原创 2021-08-12 20:09:52 · 528 阅读 · 0 评论 -
[py练习] 斐波那契新型数列
斐波那契新型数列题目是Well met with Fibonacci bigger brother, AKA Tribonacci.As the name may already reveal, it works basically like a Fibonacci, but summing the last 3 (instead of 2) numbers of the sequ...原创 2018-08-30 19:55:30 · 401 阅读 · 0 评论 -
[py练习] anagram的挑选
anagram的挑选题目描述What is an anagram? Well, two words are anagrams of each other if they both contain the same letters. For example:'abba' & 'baab' == true'abba' & 'bbaa' == true'abba'...原创 2018-08-30 19:56:37 · 509 阅读 · 0 评论 -
[py练习] 返回朋友名字的list
返回朋友名字的list题目描述Make a program that filters a list of strings and returns a list with only your friends name in it.If a name has exactly 4 letters in it, you can be sure that it has to be a fri...原创 2018-08-30 19:58:03 · 298 阅读 · 0 评论 -
[py练习] 人口增长的问题
题目描述In a small town the population is p0 = 1000 at the beginning of a year. The population regularly increases by 2 percent per year and moreover 50 new inhabitants per year come to live in the town...原创 2018-08-29 19:07:53 · 7392 阅读 · 1 评论