daipeihust
daipeihust
全部文章
题解
归档
标签
去牛客网
登录
/
注册
daipeihust的博客
全部文章
/ 题解
(共7篇)
题解 | #合并表记录#
dic = {} n = int(input()) while True: try: line = input() tmp = line.split() index = int(tmp[0]) value = int(tmp[1...
Python3
2021-09-21
35
3300
题解 | #取近似值#
import math v = float(input()) v_up = math.ceil(v) v_lo = int(v) if v_up-v <= v-v_lo: print(v_up) else: print(v_lo)
Python3
2021-09-21
0
218
题解 | #字符串分隔#
lines = [] while True: try: lines.append(input().lower()) except: break dic = {'0':0,'1':1,'2':2,'3':3,'4':4,'5':5,'6':6,'7':...
Python3
2021-09-20
0
266
题解 | #字符串分隔#
lines = [] while True: try: lines.append(input()) except: break newLines = [] for l in lines: if len(l) <= 8: ...
Python3
2021-09-20
0
341
题解 | #明明的随机数#
lines=[] while True: try: lines.append(int(input())) except: break out = set() i = 0 while i < len(lines): length = ...
Python3
2021-09-19
4
1860
题解 | #计算某字母出现次数#
string = input().lower() word = input().lower() times = 0 for w in string: if w == word: times = times + 1 print(times)
Python3
2021-09-17
0
299
题解 | #计算某字母出现次数#
string = input().lower() word = input().lower() times = 0 for w in string: if w == word: times = times + 1 print(times)
Python3
2021-09-17
0
375