何成95
何成95
全部文章
分类
归档
标签
去牛客网
登录
/
注册
何成95的博客
全部文章
(共158篇)
题解 | 最大最小值
a = list(map(int,input().split())) print(f'The maximum number is : {max(a)}') print(f'The minimum number is : {min(a)}')
2025-08-28
0
8
题解 | 牛牛是否被叫家长
print('YES' if sum(map(int,input().split()))/3 <60 else 'NO')
2025-08-28
0
8
题解 | 卡拉兹函数
n = int(input()) print(3*n+1 if n%2==1 else int(n/2))
2025-08-28
0
9
题解 | 判断闰年
n = int(input()) print('yes' if n%400==0 or n%4==0 and n%100!=0 else 'no')
2025-08-28
0
7
题解 | 求四位数各个数位之和
print(sum(map(int,list(input()))))
2025-08-28
0
7
题解 | 小红的魔法药剂
n = int(input()) a = list(map(int,input().split())) bc = [list(map(int,input().split())) for _ in range(n)] ans = 0#总花费 for i in range(n):#循环n次,直接购买该...
2025-08-28
0
9
题解 | 排座椅
n, m, k, l, d = map(int,input().split())#输入相关参数 clmt = [list(map(int,input().split())) for _ in range(d)]#输入交头接耳同学的位置 a, b = dict(), dict() for x,y,p...
2025-08-28
0
9
题解 | 01序列
m = int(input()) s = input() n = int(input()) can = [int(len(x)/2) for x in s.replace(' ','').split('1') if x!=''] print('true' if sum(can)>=n else...
2025-08-28
0
9
题解 | 灵异背包?
n = int(input()) a = list(map(int,input().split())) s = sum(a)#先计算数组的和 if s%2==1:#如果数组的和为奇数,则删除当前数组中最小的奇数 for c in sorted(a): if c%2==1: ...
2025-08-27
0
11
题解 | 小红的字符串
s = input() ans, n, l, r = 0, len(s), 0, len(s)-1 while l < r:#采用双指针法,两端指针向内靠拢 dis = abs(ord(s[l]) - ord(s[r])) ans += min(dis, 26 - dis)#寻...
2025-08-27
0
11
首页
上一页
2
3
4
5
6
7
8
9
10
11
下一页
末页