牛客681521211号
牛客681521211号
全部文章
分类
题解(33)
归档
标签
去牛客网
登录
/
注册
牛客681521211号的博客
全部文章
(共29篇)
题解 | #删除字符串中出现次数最少的字符#
while True: try: d={} n=input() for i in n: if i in d: d[i]+=1 else: ...
Python3
2021-10-14
7
1015
题解 | #汽水瓶#
while True: try: n=int(input()) if n//2 == 0: continue else: print(n//2) except: break
Python3
2021-10-14
0
429
题解 | #简单密码#
while True: try: n=input() b=[] for i in n: if ord("A") <= ord(i) <= ord("Z"): if i == "...
Python3
2021-10-14
0
327
题解 | #第一个只出现一次的字符#
# -*- coding:utf-8 -*- class Solution: def FirstNotRepeatingChar(self, s): # write code here x=-1 for i in s: ...
Python3
2021-10-14
0
358
题解 | #坐标移动#
n=input().split(";") initial=[0,0] for i in n: try: e = eval(i[1:]) if i[0] in ["A","W","S","D"]: if 0...
Python3
2021-10-14
0
370
题解 | #四则运算#
s=input().replace('{','(').replace('}',')').replace('[','(').replace(']',')') print(eval(s))
Python3
2021-10-13
0
412
题解 | #字符串排序#
n=eval(input()) d=[] for i in range(n): a=input() d.append(a) for i in sorted(d): print(i)
Python3
2021-10-13
0
336
题解 | #句子逆序#
a=input() b=[] c="" for i in range(len(a)): if a[i] == " ": b.append(c) c="" else: c+=a[i] if i == len(a)-1: ...
Python3
2021-10-13
0
313
题解 | #数字颠倒#
num_old=input() num_new="" for i in range(1,len(num_old)+1): num_new+=num_old[-i] print(num_new)
Python3
2021-10-13
0
596
题解 | #字符个数统计#
num=input() l=[] n=len(num) for i in range(n): if 0 <= ord(num[i]) <= 127: l.append(num[i]) else: continue b=set(l) prin...
Python3
2021-10-13
2
445
首页
上一页
1
2
3
下一页
末页