杨舜文
杨舜文
全部文章
分类
题解(113)
归档
标签
去牛客网
登录
/
注册
杨舜文的博客
全部文章
(共98篇)
题解 | #输入整型数组和排序标识,对其元素按照升序或降序进行排序#
while True: try: input() li = [int(x) for x in input().split()] reverse = input() except EOFError: break l...
2021-08-22
0
295
题解 | #密码强度等级#
import sys sec_level_tab = ( (90, "VERY_SECURE"), (80, "SECURE"), (70, "VERY_STRONG"), (60, "STRON...
2021-08-22
1
357
题解 | #表示数字#
import sys is_digit = lambda x: '0' <= x <= '9' for line in sys.stdin.readlines(): i = 0 li = [' '] for c in line.strip(): ...
2021-08-22
0
227
题解 | #整型数组合并#
while True: try: input() l1 = input().split() input() l2 = input().split() except EOFError: break ...
2021-08-22
0
313
题解 | #输入n个整数,输出其中最小的k个#
while True: try: line1 = input() line2 = input() except EOFError: break _, k = line1.strip().split() li = [int...
2021-08-22
0
305
题解 | #删除字符串中出现次数最少的字符#
import sys for line in sys.stdin.readlines(): line = line.strip() ret = {} m = len(line) min_c = {} for c in line: ret[c] ...
2021-08-22
0
293
题解 | #找出字符串中第一个只出现一次的字符#
import sys def check(line): for c in line: if line.count(c) == 1: print(c) return print(-1) for line in sys....
2021-08-22
0
338
题解 | #字符串字符匹配#
def is_substr(s1, s2): for c in s1: if c not in s2: return False return True while True: try: s1 = input() ...
2021-08-22
0
299
题解 | #求解立方根#
num = float(input()) if num < 0: sign = -1 num = -num else: sign = 1 l = 0 r = 1 if 0 < num < 1 else num while (r - l > 0.0001...
2021-08-22
0
263
题解 | #在字符串中找出连续最长的数字串#
import sys for line in sys.stdin.readlines(): line = line[:-1] + line[-1] length = len(line) sub = [] for start in range(length): ...
2021-08-22
2
420
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页