首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
学习
基础学习课
实战项目课
求职辅导课
专栏&文章
竞赛
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
AI面试、笔试、校招、雇品
HR免费试用AI面试
最新面试提效必备
登录
/
注册
学习生1
获赞
3
粉丝
0
关注
2
看过 TA
15
安徽信息工程学院
2027
Python
IP属地:安徽
暂未填写个人简介
私信
关注
拉黑
举报
举报
确定要拉黑学习生1吗?
发布(209)
评论
刷题
收藏
学习生1
关注TA,不错过内容更新
关注
2024-11-19 21:13
安徽信息工程学院 Python
题解 | #点击消除#
import sys str=input() list1=[] for char in str: if len(list1)==0: list1.append(char) elif len(list1)>=1 and list1[-1]!=char: list1.append(char) elif len(list1)>=1 and list1[-1]==char: list1.pop() if len(list1)==0: print(0) else: print(''.join(list1))
0
点赞
评论
收藏
分享
2024-11-19 20:45
安徽信息工程学院 Python
题解 | #有效括号序列#
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param s string字符串 # @return bool布尔型 # #遍历字符串中的每个字符,如果字符是左括号('('、'{' 或 '['),则将其压入栈中;如果字符是右括号(')'、'}' 或 ']'),则检查栈顶元#素是否与之匹配。如果匹配,则弹出栈顶元素;如果不匹配或栈为空,则说明该字符串不是有效的括号序列。最后,如果栈为空,则说明所有的括#号都正确匹配。 class Solution: def isValid(self , s: str) -> bool: # write co...
0
点赞
评论
收藏
分享
2024-11-19 20:00
安徽信息工程学院 Python
题解 | #【模板】栈#
class Stack(): def __init__(self): self.item=[] def push(self,x): self.item.append(x) def pop(self): x=self.item.pop() return x def top(self): return self.item[-1] def size(self): return len(self.item) stack1=Stack() n=int(input()) for i in range(n): a=input() if a[0:4]=='push': b=a.split(' ') stack...
0
点赞
评论
收藏
分享
2024-11-19 19:31
安徽信息工程学院 Python
题解 | #截取出年龄#
select substring_index(substring_index(profile,',',3),',',-1) as age, count(*) as number from user_submit group by age;
0
点赞
评论
收藏
分享
2024-11-19 19:24
安徽信息工程学院 Python
题解 | #提取博客URL中的用户名#
select device_id, substring_index(blog_url,'/',-1) as user_name from user_submit;
0
点赞
评论
收藏
分享
2024-11-19 19:22
安徽信息工程学院 Python
题解 | #统计每种性别的人数#
select substring_index(profile,',',-1) as gender, count(*) as number from user_submit group by gender;
0
点赞
评论
收藏
分享
2024-11-19 19:11
安徽信息工程学院 Python
题解 | #统计每个用户的平均刷题数#
select user_profile.university as university, question_detail.difficult_level as difficult_level, round(count(question_practice_detail.question_id)/count(distinct question_practice_detail.device_id),4) as avg_answer_cnt from user_profile,question_practice_detail,question_detail where user_profile.de...
0
点赞
评论
收藏
分享
2024-11-19 19:05
安徽信息工程学院 Python
题解 | #统计每个学校各难度的用户平均刷题数#
select user_profile.university as university, question_detail.difficult_level as difficult_level, round(count(question_practice_detail.question_id)/count(distinct question_practice_detail.device_id),4) as avg_answer_cnt from user_profile,question_practice_detail,question_detail where user_profile.de...
0
点赞
评论
收藏
分享
2024-11-19 18:26
安徽信息工程学院 Python
题解 | #21年8月份练题总数#
select count(distinct device_id) as did_cnt, count(question_id) as question_cnt from question_practice_detail where date >= '2021-08-01' and date <= '2021-08-31';
0
点赞
评论
收藏
分享
2024-11-19 18:21
安徽信息工程学院 Python
题解 | #查找后降序排列#
select device_id, gpa, age from user_profile order by gpa desc,age desc;
0
点赞
评论
收藏
分享
2024-11-19 18:19
安徽信息工程学院 Python
题解 | #查找后多列排序#
select device_id, gpa, age from user_profile order by gpa,age;
0
点赞
评论
收藏
分享
2024-11-19 18:18
安徽信息工程学院 Python
题解 | #查找后排序#
select device_id, age from user_profile order by age;
0
点赞
评论
收藏
分享
2024-11-19 17:23
安徽信息工程学院 Python
题解 | #统计牛客网部分用户使用语言#
import pandas as pd test1=pd.read_csv('Nowcoder.csv',encoding='utf-8') print(test1['Language'].iloc[10:21])
0
点赞
评论
收藏
分享
2024-11-19 17:16
安徽信息工程学院 Python
题解 | #牛客网用户数据集的大小#
import pandas as pd test1=pd.read_csv('Nowcoder.csv',encoding='utf-8') a=len(test1) b=len(test1.columns) print((a,b))
0
点赞
评论
收藏
分享
2024-11-19 17:10
安徽信息工程学院 Python
题解 | #用pandas查看牛客网用户数据#
import sys import pandas as pd test1=pd.read_csv('Nowcoder.csv',encoding='utf-8',dtype=object) print(test1.head(6))
0
点赞
评论
收藏
分享
1
9
10
11
12
13
14
创作者周榜
更多
关注他的用户也关注了:
牛客网
牛客网在线编程
牛客网题解
牛客企业服务