GB279824
GB279824
全部文章
分类
归档
标签
去牛客网
登录
/
注册
GB279824的博客
全部文章
(共190篇)
题解 | 进制转换
numOx = input().strip() values = { 'A':10, 'B':11, 'C':12, 'D':13, 'E':14, 'F':15 } sums = 0 j=0 for i in range(len(numOx)-1,1...
2025-06-17
0
27
题解 | 直线与圆交点间距
import math class Point: def __init__(self, A, B): self.x = A self.y = B class Line: def __init__(self, A, B): self.p...
2025-06-16
0
23
题解 | 三角形面积
import math class Point: def __init__(self, x, y): self.x = x self.y = y class Triangle: def __init__(self, a, b, c): ...
2025-06-11
0
30
题解 | 点到直线距离
import math class Point: def __init__(self, x, y): self.x = x self.y = y class Line: def __init__(self, point_a, point_b): ...
2025-06-11
0
20
题解 | 两点间距离
import math # class Point: # def __init__(self, a=0, b=0): # self.x = a # self.y = b # # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # ...
2025-06-11
0
40
题解 | 最厉害的学生
def find_top_student(): n = int(input().strip()) top_student = None max_score = -1 for _ in range(n): line = input().strip()....
2025-06-11
0
37
题解 | 机器翻译
def page_replaced(l,k,pages): cache = [] missed_count = 0 for page in pages: if page not in cache: missed_count += 1 ...
2025-06-11
0
24
题解 | 参议院投票
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # 求出最终获胜帮派的名称 # @param s string字符串 # @return string字符串 # class Solution: def predictVictory(self , s: ...
2025-06-11
0
30
题解 | 用两个栈实现队列
# -*- coding:utf-8 -*- class Solution: def __init__(self): self.stack1 = [] self.stack2 = [] def push(self, node): # w...
2025-06-11
0
32
题解 | 无法吃午餐的学生数量
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param students int整型一维数组 # @param sandwiches int整型一维数组 # @return int整型 # class Solution: def co...
2025-06-11
1
30
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页