首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
学习
基础学习课
实战项目课
求职辅导课
专栏&文章
竞赛
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
AI面试、笔试、校招、雇品
HR免费试用AI面试
最新面试提效必备
登录
/
注册
弄莲子
获赞
7
粉丝
0
关注
0
看过 TA
1
河北地质大学
2022
数据分析师
IP属地:河北
暂未填写个人简介
私信
关注
拉黑
举报
举报
确定要拉黑弄莲子吗?
发布(23)
评论
刷题
收藏
弄莲子
关注TA,不错过内容更新
关注
2023-03-20 00:47
河北地质大学 数据分析师
题解 | #输入整型数组和排序标识,对其元素排序#
n = int(input()) array = sorted(list(map(int, input().split()))) flag = int(input()) if flag == 0: print(*array) else: print(*array[::-1]) 求问:sorted(array)为什么没有排好序,而sorted(list(map(int, input().split())))就能排好?
0
点赞
评论
收藏
分享
2023-03-19 14:35
已编辑
河北地质大学 数据分析师
题解 | #求int型正整数在内存中存储时1的个数#
n = int(input()) x = bin(n) print(x.count('1')) abs取绝对值,ord转assic码,hex十进制转16进制,bin十进制转二进制
0
点赞
评论
收藏
分享
2023-03-19 14:16
河北地质大学 数据分析师
题解 | #字符串排序#
n = int(input()) list1 = [] for i in range(n): x = input() list1.append(x) print(*(sorted(list1)),sep = '\n')
0
点赞
评论
收藏
分享
2023-03-19 14:12
河北地质大学 数据分析师
题解 | #句子逆序#
my_str = input().split(' ') print(*my_str[::-1])
0
点赞
评论
收藏
分享
2023-03-19 14:09
河北地质大学 数据分析师
题解 | #数字颠倒#
n = input() print(n[::-1])
0
点赞
评论
收藏
分享
2023-03-19 14:07
河北地质大学 数据分析师
题解 | #字符个数统计#
my_str = input() print(len(set(my_str)))
0
点赞
评论
收藏
分享
2023-03-17 23:41
河北地质大学 数据分析师
题解 | #提取不重复的整数#
n = int(input()) # n = 9876673 n1 = str(n)[::-1] # 3766789 n2 = [] for i in n1: if i not in n2: n2.append(i) for i in n2: print(i, end = '')
0
点赞
评论
收藏
分享
2023-03-16 22:10
河北地质大学 数据分析师
题解 | #进制转换#
n1 = input() # n1 = 'oxAA' n2 = 0 n3 = 1 for i in n1[2:]: if i == 'A' or i == "a": n4 = 10 elif i == 'B' or i == 'b': n4 = 11 elif i == 'C' or i == 'c': n4 = 12 elif i == 'D' or i == 'd': n4 = 13 elif i == 'E' or i == 'e': n4 = 14 elif i == 'F' or i == 'f': n4 = 15 else: n4 = int(i) n2 += n4 *(16**(...
0
点赞
评论
收藏
分享
2023-03-16 20:50
河北地质大学 数据分析师
题解 | #字符串分隔#
def split_8(str1): if len(str1) > 8: print(str1[:8]) split_8(str1[8:]) else: print(str1 + (8-len(str1))*'0') while True: # 多行输入的话,避免异常 try: str1 = input("") split_8(str1) except: break
0
点赞
评论
收藏
分享
2023-03-15 23:12
河北地质大学 数据分析师
题解 | #明明的随机数#
my_list = [] N = int(input()) for i in range(0,N): x = int(input()) my_list.append(x) my_list.sort() # print(my_list) my_list1 = set(my_list) my_list2 = list(my_list1) my_list2.sort() # print(my_str1) for i in my_list2: print(i)
0
点赞
评论
收藏
分享
2023-03-15 22:23
河北地质大学 数据分析师
题解 | #字符串最后一个单词的长度#
my_str = input().split() print(len(my_str[-1]))
0
点赞
评论
收藏
分享
2023-03-15 22:21
河北地质大学 数据分析师
题解 | #计算某字符出现次数#
my_str = input().lower() x = input().lower() print(my_str.count(x))
0
点赞
评论
收藏
分享
2023-03-10 21:03
河北地质大学 数据分析师
题解 | #牛客网用户没有补全的信息#
import pandas as pdbuf = pd.read_csv("Nowcoder.csv", sep = ',',dtype = object)print(buf.isnull()any(axis = 0))
0
点赞
评论
收藏
分享
2023-03-02 18:08
河北地质大学 数据分析师
题解 | #修改属性2#
class Employee(object): def __init__(self, name,salary): self.name = name self.salary = salary def printclass(self): print(f"{self.name}'salary is {self.salary}, and his age is {self.age}")name = input()salary = int(input())age = int(input())print(hasattr(Employee,'age'))setattr(Employee, 'age', age...
0
点赞
评论
收藏
分享
2023-02-25 20:47
河北地质大学 数据分析师
题解 | #修正错误的字母#
l1 = input()print(l1.replace('a*','ab')) a*和ab记得加引号
0
点赞
评论
收藏
分享
1
2
创作者周榜
更多
关注他的用户也关注了:
牛客网
牛客网在线编程
牛客网题解
牛客企业服务