牛客926165907号
牛客926165907号
全部文章
分类
归档
标签
去牛客网
登录
/
注册
牛客926165907号的博客
全部文章
(共46篇)
题解 | 提取不重复的整数
n = input() while n[-1] == 0: n = input() m = n[::-1] res = [] for i in m: if i not in res: res.append(i) for i in res: print(f&qu...
2025-08-04
0
38
题解 | 合并表记录
n = int(input()) ab = {} for i in range(n): a, b = input().split() b = int(b) ab[a] = ab.get(a, 0) + b for k in sorted(ab.keys(), key=lamb...
2025-08-03
1
50
题解 | 取近似值
from decimal import Decimal, getcontext getcontext().rounding = 'ROUND_HALF_UP' x = Decimal(input()) print(f"{x:.0f}")
2025-08-03
0
30
题解 | 质数因子
from math import sqrt n = int(input()) for i in range(2, int(sqrt(n))+1): while n % i == 0 and n >= i: n = n // i print(i, end...
2025-08-03
0
37
题解 | 进制转换
s = input() x = int(s, 16) print(f"{x}")
2025-08-03
0
52
题解 | 字符串分隔
s = input() i = 0 while i < len(s) and i + 8 < len(s): print(f"{s[i:i+8]}") i += 8 else: print(f"{s[i:i+8].ljust(8, '...
2025-08-03
0
34
题解 | 明明的随机数
cnt = int(input()) while True: if cnt >= 1 and cnt <= 1000: number = [] for i in range(cnt): num = int(input()) ...
2025-08-01
0
45
题解 | 创建一个actor表,包含如下列信息
create table actor( actor_id smallint(5) not null comment '主键id', first_name varchar(45) not null comment '名字', last_name varchar(45) not ...
2025-07-28
0
42
题解 | 使用join查询方式找出没有分类的电影id以及名称
select film_id, title from film left join film_category using(film_id) where category_id is null
2025-07-28
0
51
题解 | 获取员工其当前的薪水比其manager当前薪水还高的相关信息
select dept_emp.emp_no, dept_manager.emp_no as manager_no, salaries.salary as emp_salary, salaries2.salary as manager_salary from dept_emp left j...
2025-07-28
0
35
首页
上一页
1
2
3
4
5
下一页
末页