lee≤e
lee≤e
全部文章
分类
题解(22)
归档
标签
去牛客网
登录
/
注册
leebobo
全部文章
(共25篇)
题解 | #提取数字电话#
import re string1=input() parran = re.compile('\d') parrans = re.findall(parran, string1) # 此...
2022-08-13
0
332
题解 | #查找学校是北大的学生信息#
select device_id,university from user_profile where university = '北京大学'
2022-08-13
0
259
题解 | #将查询后的列重新命名#
将查询的列重新命名 select 原列名 新列名 from 表名 select 原列名 as 新列名 from 表名
2022-08-13
0
271
题解 | #查询结果限制返回行数#
limit,limit 数字(限制行数) offset 数字(跳过行数) select 列名 from 表名 limit 开始行数,结束行数 select 列名 from 表名 l...
2022-08-13
0
285
题解 | #寻找峰值#
# 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param nums int整型一维数组 # @return int整型 # class Solution: def findPeakElement(self , nums: List[int])...
Python3
2022-04-19
0
368
题解 | #寻找第K大#
# 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param a int整型一维数组 # @param n int整型 # @param K int整型 # @return int整型 #reverse=True,sort倒序排列 class Sol...
Python3
2022-04-18
0
325
题解 | #排序#
#好使,速度超过99%的python代码 class Solution: def MySort(self , arr: List[int]) -> List[int]: # write code here return sorted(arr)
Python3
2022-04-18
0
321
题解 | #反转数字#
#先把x转为字符串判断是不是负数,然后切片反转,最后再转为int判断大小是不是在范围内 class Solution: def reverse(self , x: int) -> int: # write code here x=str(x) ...
Python3
2022-04-18
0
336
题解 | #翻转单词#
#将字符串中以空格为分隔符加入到列表l中 #再将l中元素以空格为分隔符连接成新的字符串,否则返回的是列表 class Solution: def reverseWord(self , str: str) -> str: # write code here ...
Python3
2022-04-18
0
394
题解 | #打印从1到最大的n位数#
#生成 1-10的n次方-1 的列表 class Solution: def printNumbers(self , n: int) -> List[int]: # write code here return [i for i in range(1,1...
Python3
2022-04-18
0
317
首页
上一页
1
2
3
下一页
末页