Nicole_jian
Nicole_jian
全部文章
分类
归档
标签
去牛客网
登录
/
注册
Nicole_jian的博客
全部文章
(共104篇)
题解 | #获取当前薪水第二多的员工的以及其对应的薪水#
SELECT emp_no, salary FROM salaries WHERE salary = (SELECT DISTINCT salary FROM salaries ORDER BY salary DESC ...
2024-05-22
0
119
题解 | #查找最晚入职员工的所有信息#
SELECT * FROM employees ORDER BY hire_date DESC LIMIT 1;
2024-05-22
0
118
题解 | #输入n个整数,输出其中最小的k个#
def find_smallest_k(numbers, k): # 将整数数组排序并返回最小的k个整数 return sorted(numbers)[:k] # 输入n和k的值 n, k = map(int, input().split()) # 输入一个整数数组 number...
2024-05-22
0
127
题解 | #取近似值#
def approximate_integer(value): integer_value = int(value) if value - integer_value >= 0.5: return integer_value + 1 else: ...
2024-05-22
0
132
题解 | #输入n个整数,输出其中最小的k个#
n, k = map(int, input().split()) a = list(map(int, input().split())) a.sort() print(" ".join(str(x) for x in a[:k]))
2024-05-22
0
134
题解 | #统计字符#
def count_characters(s): # 初始化计数器 count_letter = 0 count_space = 0 count_digit = 0 count_other = 0 # 遍历字符串中的每个字符,统计各类字符的个数 ...
2024-05-22
0
172
题解 | #取近似值#
def approximate_integer(value): # 将小数点后的部分提取出来 decimal = value - int(value) # 如果小数点后的数值大于等于 0.5,则向上取整 if decimal >= 0.5: ...
2024-05-22
0
125
题解 | #合并表记录#
def merge_records(n): records = {} for _ in range(n): index, value = map(int, input().split()) if index in records: ...
2024-05-22
0
147
题解 | #奇偶统计#
N = int(input()) odd_count = 0 even_count = 0 for i in range(1, N + 1): if i % 2 == 0: even_count += 1 else: odd_count += 1 ...
2024-05-22
0
147
题解 | #KiKi说祝福语#
n = int(input()) for _ in range(n): print("Happy new year!Good luck!")
2024-05-22
0
143
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页