平凡的人5
平凡的人5
全部文章
分类
题解(61)
归档
标签
去牛客网
登录
/
注册
平凡的人5的博客
全部文章
(共54篇)
题解 | #百钱买百鸡问题#
s=input() if s.isdigit(): # 这的判断条件还是没弄好,但是过了。我写if s 但是0也是整数if s 或者if s==0? #print(s) for x in range(0,21): for y in range(0,34): for z in rang...
Python3
2022-04-18
0
283
题解 | #求最大连续bit数#
while True: try: n = int(input()) # 获取整数 if n<1 or n>500000: break s= bin(n) # 转换二进数 t = str(s).replace('0b', '') #...
Python3
2022-04-18
0
262
题解 | #记票统计#
while True: try: # 人数量 ren_n = int(input()) # 名字列表 names = input().split() # 总票数量 p_count = int(input()) # 总票列表 tickets = input().split() print(ren_n)...
Python3
2022-04-18
0
357
题解 | #记负均正#
n = input() # 个数 num_list = input().split() # 转换成列表 print(n) print(num_list) 计算0 的数量 zero_count = num_list.count('0') #print(zero_count) if zero_coun...
Python3
2022-04-18
0
267
题解 | #进制转换#
while True: try: out_num = 0 in_str = input() # 设置字典 dic_word = {'0':0,'1':1,'2':2,'3':3,'4':4,'5':5,'6':6,'7':7,'8':8,'9':9,'A':10,'B':11,'C':12,'D':...
Python3
2022-04-18
0
288
题解 | #字符串分隔#
in_str = input() 使用字符串的lstrip还是rstrip方法补零,方法忘了,查一下 采用长度对8取余法,余数是多少,就补充8-余数个零 zero_count = 8-(len(in_str)%8) #print(zero_count) if zero_count ==8: zero...
Python3
2022-04-16
0
318
题解 | #计算某字符出现次数#
in_str = input().lower() in_word = input().lower() # 获取第二行字符,都转换成小写 #in_list = in_str.split() 打印一下列表,看看啥样,结果没有获取第二行字符 print(in_list) print(in_word) 计...
Python3
2022-04-16
0
280
题解 | #查找最晚入职员工的所有信息#
/不会日期函数了,用一个子查询/ select emp_no ,birth_date, first_name, last_name, gender, hire_date from employees where hire_date=(select max(hire_date) from employ...
Mysql
2022-04-16
1
228
题解 | #分组计算练习题#
/* 我总感觉这么写怪怪的,group by 有的学一下啊*/ select gender ,university ,count(1) as user_num, sum(active_days_within_30)/count(1) as avg_active_day, sum(question_c...
Mysql
2022-04-15
0
277
题解 | #密码强度等级#
我一定是一个大冤种,查了各种信息,穷举了无数次才解出来,如果你看到了,请点个赞支持一下,谢谢 in_str = input() 1长度 if len(in_str) <= 4: len_score = 5 elif len(in_str) > 4 and len(in_str) <...
Python3
2022-04-15
0
433
首页
上一页
1
2
3
4
5
6
下一页
末页