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 · 844 阅读 · 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 · 511 阅读 · 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 · 646 阅读 · 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 · 410 阅读 · 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 · 7684 阅读 · 1 评论
分享