首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
学习
课程
专栏·文章
竞赛
搜索
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
在线笔面试、雇主品牌宣传
登录
/
注册
十方劫
获赞
0
粉丝
0
关注
4
看过 TA
0
太原理工大学
2020
前端工程师
IP属地:山西
暂未填写个人简介
私信
关注
拉黑
举报
举报
确定要拉黑十方劫吗?
发布(6)
刷题
十方劫
02-08 00:46
前端工程师
题解 | #表示数字#
#遍历时如果前后是数字和其他字符相隔/或其他字符和数字相隔,则先加i再加* #第一位和最后一位分开考虑 while True: try: n=input() l=[] if len(n)==0: print(0) break if len(n)==1: if n.isdigit(): l.append('*') l.append(n) l.append('*...
0
点赞
评论
收藏
转发
十方劫
02-04 01:10
前端工程师
题解 | #最长回文子串#
while True: try: n = input() left = 0 right = 0 res = [] def hw(x): x = str(x) a = [] for i in x: a.append(i) while len(a) >= 2: if a.pop(0) != a.pop(): ...
0
点赞
评论
收藏
转发
十方劫
02-03 21:01
前端工程师
题解 | #查找组成一个偶数最接近的两个素数#
def ss(x): x=int(x) if x==1: return False for i in range(2,x): if x%i==0: return False return True while True: try: n=int(input()) mid=n/2 left=0 right=0 while not (ss(mid-left) and ss(mid+right)) or (mid-left)...
0
点赞
评论
收藏
转发
十方劫
02-03 14:07
前端工程师
题解 | #汽水瓶#
while True: try: s=int(input()) count=0 while s>1: #先借瓶子 s+=1 #换瓶子喝水 count=count+s//3 #剩余的瓶子和喝完水的瓶子 s=s%3+s//3 #还瓶子 s-=1 if count==0: break else:...
0
点赞
评论
收藏
转发
十方劫
01-29 19:40
前端工程师
题解 | #MP3光标位置#
while True: try: n = int(input()) l = [] for i in range(1, n + 1): l.append(i) # print(l) m = [] s = input() for i in s: m.append(i) # print(m) # 初始化mid为光标位置 mid = 1 # left和right为首行和尾行...
0
点赞
评论
收藏
转发
十方劫
01-17 00:23
前端工程师
题解 | #字符串加解密#
jia_list=[] jie_list=[] def jia_mi(jia): for i in jia: i=str(i) if i.isupper() and i!='Z': i=ord(i)+33 jia_list.append(chr(i)) elif i=='Z': jia_list.append('a') elif i.islower() and i!='z': i=ord(i)-31 j...
0
点赞
评论
收藏
转发
1
工具箱
TA的圈子
暂未加入圈子
TA的圈子
TA的笔记
暂无笔记
TA的笔记
登录
0
天
已登录
0
天
连续登录
0
人
今日访客
牛客网
牛客企业服务