catheread
catheread
全部文章
分类
题解(21)
归档
标签
去牛客网
登录
/
注册
catheread的博客
全部文章
(共25篇)
题解 | #合并用户信息表与用户活跃表#
print(Nowcoder1.merge(Nowcoder2,on='Nowcoder_ID'))
Python3
2022-08-20
0
163
题解 | #统计运动会项目报名人数#不知道哪里出错
import pandas as pd signup = pd.read_csv('signup.csv') items = pd.read_csv('items.csv') df = signup[item...
Python3
2022-08-20
0
202
题解 | #将用户的json文件转换为表格形式#
import pandas as pd import json pd.set_option('display.width', 300) # 设置字符显示宽度 pd.set_option('display.max_rows', None) # 设置显示最大行 pd.set_o...
Python3
2022-08-17
0
217
题解 | #统计牛客网部分用户使用语言#
import pandas as pd Nowcoder = pd.read_csv('Nowcoder.csv',sep=',',dtype=object) print(Nowcoder['Language'].loc[10:21])
Python3
2022-08-17
1
176
题解 | #24点游戏算法# 菜鸡的无可奈何
while 1: try: s =&n...
2022-07-02
0
142
题解 | #公共子串计算#暴力破解且解答区最菜最没赢过的答案
while 1: try: s1, s2 = input().strip(), input().strip...
2022-07-02
0
102
题解 | #Redraiment的走法#求最长子序列,使用二分法的变形去维护一个递增数组
n = int(input()) string = list(map(lambda x:int(x),input().strip().split(' '))) def binsearch1(li, target): start = 0 end = li.len() - 1 res = None wh...
Python3
2022-06-26
0
181
题解 | #合法IP# 硬编码
while 1: try: ip = input() ip = ip.split('.') if len(ip) != 4 : print('NO') continue ...
Python3
2022-06-26
0
120
题解 | #统计大写字母个数#莫名其妙
string = input() import re res = 0 for i in string: if re.findall(r'[A-Z]',i): res += 1 print(res)
Python3
2022-06-26
0
110
题解 | #找出字符串中第一个只出现一次的字符#不懂为什么是中等题
string = input().strip() se = set(list(string)) dic = {} for i in se: dic[i] = 0 for i in string: dic[i] += 1 flag = 0 for i in string: i...
Python3
2022-06-26
0
187
首页
上一页
1
2
3
下一页
末页