松鼠霖
松鼠霖
全部文章
分类
题解(48)
归档
标签
去牛客网
登录
/
注册
松鼠霖的博客
全部文章
(共2篇)
题解 | #数字在升序数组中出现的次数#
作为得第一反应,就是想的直接遍历统计或者转换成字符串,调用count() # -*- coding:utf-8 -*- class Solution: def GetNumberOfK(self, data, k): &n...
遍历
count()
字符串
string()
2021-09-07
0
304
题解 | #整数中1出现的次数(从1到n整数中1出现的次数)#
第一反应想到得就是遍历:把数字通过str转换成字符串储存在列表中,再遍历判断 # -*- coding:utf-8 -*- class Solution: def NumberOf1Between1AndN_Solution(self, n): &n...
遍历
str()
count()
字符串
string()
2021-09-07
0
294