Banana1223
Banana1223
全部文章
分类
归档
标签
去牛客网
登录
/
注册
Banana1223的博客
全部文章
(共5篇)
题解 | 买橘子
n = int(input()) rs = [] for x in range(n//8 + 1): for y in range((n-8*x)//6 + 1): if x*8 + y*6 == n: r = x+y rs....
2025-09-03
1
37
题解 | 计算每日累计利润
select *, sum(profit) over (order by profit_date) cumulative_profit from daily_profits order by profit_date
2025-05-12
10
59
题解 | 最长连续登录天数
select user_id, max(consec_days) as max_consec_days from ( select user_id, date_sub(fdate, interval t1.n day) as g, count(fdate) as conse...
2025-05-09
0
53
题解 | 统计每个产品的销售情况
select p.product_id, round(p.unit_price * o.total_quantity, 2) as total_sales, round(p.unit_price, 2) as unit_price, o.total_quantity, round(p.unit_pr...
2025-05-09
0
45
题解 | 查询连续登陆的用户
select a.user_id from ( select a.user_id, STR_TO_DATE(left(a.log_time,10), '%Y-%m-%d') as log_day, DATE_ADD(STR_TO_DATE(LEFT(a.log_time,10), '%Y-%m-%d...
2025-05-09
2
59