Naruse
Naruse
全部文章
分类
归档
标签
去牛客网
登录
/
注册
Naruse的博客
全部文章
(共11篇)
题解 | 下单复盘
这几天新增的题感觉都是这个套路啊,在用户表里加入空值数据 with t as ( select o.customer_id,customer_name, count(distinct o.order_id) as feb_2024_order_count, round(sum(qty*price),...
2025-09-19
0
46
题解 | 统计借阅量
with t1 as ( select br.book_id,book_title, sum(if(borrow_date like '2023-02%',1,0)) as feb_2023_borrows, sum(if(borrow_date like '2024-02%',1,0)) as f...
2025-09-18
0
44
题解 | 统计每个产品的销售情况
神人需求 with q5 as ( select o.product_id, round(sum(quantity)*unit_price,2) as total_sales, unit_price, round(sum(quantity),2) as total_quantity, round(s...
2025-08-06
0
63
题解 | 讨厌鬼进货
import sys n,x = map(int,input().split()) a = list(map(int,input().split())) b = list(map(int,input().split())) s = 0 for i in range(n): s = s + m...
2025-07-31
0
75
题解 | 小红的优惠券
import sys n,m =map(int,input().split()) p = [] for i in range(m): a , b = [int(i) for i in input().split()] if n >= a: p.append(n-...
2025-07-30
0
56
题解 | 支付宝消费打折
n,k = map(int,input().split()) g = list(map(int,input().split())) z = str(input()) f = [] for i in range(n): if z[i] == '1': f.append(g[i]...
2025-07-30
0
66
题解 | 淘宝店铺的实际销售额与客单价
看着好像没有加入时间限定条件得,加了一个12月下旬where条件 select round(sum(sale_sum),3) as sales_total, round(sum(sale_sum) / count(distinct user_id),3) as per_trans from ( se...
2025-07-30
0
47
题解 | 小苯送礼物
import sys data = sys.stdin.read().split() n = int(data[0]) k = int(data[1]) fans = [] index = 2 for i in range(1, n + 1): x = int(data[index]) ...
2025-07-29
0
70
题解 | 被重复观看次数最多的3个视频
select cid, pv, rk from ( select cid, round(cast(pv as float),3) as pv, row_number() over(order by pv desc,release_date desc) as rk from ( select p....
2025-07-29
0
51
题解 | 特殊的科学计数法
n = str(input()) if int(n[2]) >= 5: if int(n[1]) == 9: if int(n[0]) == 9: a = 1 b = 0 c = len(n) ...
2025-07-28
0
62
首页
上一页
1
2
下一页
末页