CARLJOSEPHLEE
CARLJOSEPHLEE
全部文章
分类
题解(26)
归档
标签
去牛客网
登录
/
注册
CARLJOSEPHLEE的博客
全部文章
(共216篇)
题解 | 取近似值
a,b = input().split(".") if int(b[0]) >= 5: print(int(a)+1) else: print(int(a))
2025-03-01
0
51
题解 | 进制转换
print(int(input(),16))
2025-03-01
0
46
题解 | 字符串分隔
from sys import stdin, stdout input = lambda: stdin.readline().strip() print = lambda x: stdout.write(str(x) + "\n") s = input() n = len(s)...
2025-03-01
0
49
题解 | 明明的随机数
from sys import stdin, stdout input = lambda: stdin.readline().strip() print = lambda x: stdout.write(str(x) + "\n") n = int(input()) print(...
2025-03-01
0
44
题解 | 计算某字符出现次数
from sys import stdin, stdout input = lambda: stdin.readline().strip() print = lambda x: stdout.write(str(x) + "\n") a = input().lower() pr...
2025-03-01
0
44
题解 | 字符串最后一个单词的长度
print(len(input().split()[-1]))
2025-03-01
0
50
题解 | 小红的双生串
from sys import stdin, stdout from collections import Counter input = lambda: stdin.readline().strip() print = lambda x: stdout.write(str(x)+"\...
2025-03-01
0
53
题解 | #小苯的区间选数#
思路很简单,直接上代码 from sys import stdin input = stdin.readline t = int(input()) def sumdigit(x): return sum(int(i) for i in str(x)) def f(ltrue,rtrue,te...
Python3
pypy3
数组
数学
贪心
2024-11-13
0
371
题解 | #小H学数学#
首先考察y=0的情形,得到字典d。然后思考y=1的情形,发现就是枚举,然后temp = i+j,方案数相乘即可。 为什么只用考虑i+j?而不用考虑什么i-j、-i+j、-i-j?仔细思考y=0的情形,相信聪明的读者们一定会得到答案。 from copy import deepcopy MOD = 1...
Python3
pypy3
数组
数学
动态规划
哈希表
2024-11-02
0
270
题解 | #小H学语文#
根据题意模拟即可 n = int(input()) l = [int(i) for i in input().split()] l2 = [] index = 1 for i in l: l2.append((i,index)) index += 1 l2.sort(key=lamb...
Python3
pypy3
数组
数学
2024-11-02
0
264
首页
上一页
13
14
15
16
17
18
19
20
21
22
下一页
末页