catheread
catheread
全部文章
分类
题解(21)
归档
标签
去牛客网
登录
/
注册
catheread的博客
全部文章
(共25篇)
题解 | #字符串分隔#第一次打败这么多人
string = input() n = len(string) l = 0 while l < n: if n - 8 < l: print(string[l:].ljust(8,'0')) else: print(string[l:l...
Python3
2022-06-20
0
95
题解 | #字符串排序#牛客网里面最短的python代码没有之一
res = [] for i in range(n): res.append(input()) li = sorted(res) for i in li: print(i)
Python3
2022-06-11
0
182
题解 | #整数与IP地址间的转换# bin + int(‘xxx’,2)
#!/usr/bin/env python -- coding: utf-8 -- @Time : 2022/6/9 23:32 @Author : Jonathon @File : HJ33.py @Software: PyCharm @ Motto : 客又至,当如何 string...
Python3
2022-06-10
0
192
题解 | #密码验证合格程序#使用的是集合来判断
low = set([chr(i) for i in range(67, 91)]) cap = set([chr(i) for i in range(97, 123)]) num = set([str(i) for i in range(10)]) while True: try: string ...
Python3
2022-06-09
0
203
题解 | #跳台阶#第一次使用备忘录做对这道题
代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 @param number int整型 @return int整型 class Solution: memn = {} def jumpFloor(self , number: int) -> int: n...
Python3
2022-06-08
0
171
首页
上一页
1
2
3
下一页
末页