Nicole_jian
Nicole_jian
全部文章
分类
归档
标签
去牛客网
登录
/
注册
Nicole_jian的博客
全部文章
(共104篇)
题解 | #求最小公倍数#
import math def find_lcm(a: int, b: int) -> int: """ 计算两个正整数a和b的最小公倍数(LCM) """ gcd_value = math.gcd(...
2024-04-22
0
165
题解 | #字符串反转#
def reverse_string(s): # 确保输入字符串仅包含小写字母 assert all(c.islower() for c in s), "输入字符串必须只包含小写字母" # 使用切片操作翻转字符串 reversed_s = s[::...
2024-04-22
0
132
题解 | #连续最大和#
def max_subarray_sum(arr): if not arr: return 0 cur_sum = max_sum = arr[0] for num in arr[1:]: cur_sum = max(num, cur_su...
2024-04-16
0
149
题解 | #球的表面积#
import math def sphere_surface_area(radius): """计算球的表面积""" return 4 * math.pi * radius**2 # 给定的半径列表 radii = [1...
2024-04-10
0
159
题解 | #类型判断#
import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner scanner = new Scanner(Sy...
2024-03-22
0
165
题解 | #判断学生成绩#
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); ...
2024-03-22
0
147
题解 | #map简单应用#
import java.util.HashMap; import java.util.Map; import java.util.Scanner; public class Main { public static void main(String[] args) { //...
2024-03-22
0
190
题解 | #找出每个学校GPA最低的同学#
select device_id, university, gpa from user_profile where (university, gpa) in (select university, min(gpa) from user_profile group by university) ord...
2024-02-06
0
121
题解 | #统计每个用户的平均刷题数#
select university, difficult_level, count(qd.question_id)/count(DISTINCT qpd.device_id) as avg_answer_cnt from user_profile as u inner join question_p...
2024-01-27
0
149
题解 | #按照数量和价格排序#
select quantity, item_price from OrderItems Order by quantity DESC, item_price DESC;
2023-09-22
0
174
首页
上一页
2
3
4
5
6
7
8
9
10
11
下一页
末页