风飞飞飞
风飞飞飞
全部文章
分类
题解(57)
归档
标签
去牛客网
登录
/
注册
风飞飞飞的博客
全部文章
(共64篇)
题解 | #链表相加(二)#
# class ListNode: # def __init__(self, x): # self.val = x # self.next = None # # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @para...
2023-11-25
0
245
题解 | #扫雷#
def get_mine(matrix, raw, col): result = [['*'] * col for _ in range(raw)] eight_direct = [(0, 1), (1, 0), (-1, 0), (0, -1), (1, 1), (1, -1), ...
2023-11-14
0
220
题解 | #修改属性1#
class Employee: def __init__(self, name, salary): self.name = name self.salary = salary # self.age = None def printcl...
2023-11-09
0
187
题解 | #被5整除的数字#
my_list = [num for num in range(1, 51) if num % 5 == 0] for i in my_list: print(i)
2023-11-09
0
239
题解 | #牛牛的绩点#
score = {'A':4.0, 'B':3.0, 'C':2.0, 'D':1.0, 'F':0} niu_score = {} score_sum = 0 credit_sum = 0 flag = str(input()) while flag != 'False': assert...
2023-11-09
0
239
题解 | #菜品的价格#
dish = {'pizza':10, 'rice':2, 'yogurt':5} dish_str = input() if dish_str in dish.keys(): print(dish[dish_str]) else: print(8)
2023-11-09
0
186
题解 | #禁止重复注册#
current_users = ['Niuniu', 'Niumei', 'GURR', 'LOLO'] current_users_lower = [i.lower() for i in current_users] new_users = ['GurR', 'Niu Ke Le', 'LoLo'...
2023-11-09
0
237
题解 | #统计2021年10月每个退货率不大于0.5的商品各项指标#
select product_id,round(sum(if_click)/count(1),3) as ctr, round(if(sum(if_click)!=0,sum(if_cart)/sum(if_click),0),3) as cart_rate, round(if(sum(if_car...
Mysql
2022-04-01
0
322
题解 | #计算商城中2021年每月的GMV#
select date_format(event_time,'%Y-%m') as month,round(sum(total_amount)) as GMV from tb_order_overall where (status=1 or status=0) and year(event_time...
Mysql
2022-04-01
0
283
题解 | #每天的日活数及新用户占比#
select t1.dt,count(distinct t1.uid) as dau, round(count(t2.uid)/count(distinct t1.uid),2) as uv_new_ratio from (select uid,date(in_time) as dt ...
Mysql
2022-03-30
0
280
首页
上一页
1
2
3
4
5
6
7
下一页
末页