邱子策
邱子策
全部文章
分类
归档
标签
去牛客网
登录
/
注册
邱子策的博客
全部文章
(共9篇)
题解 | 格式化输出(二)
s = input() print(s.lower()) print(s.upper()) print(s.title())
2026-04-05
0
7
题解 | 截取用户名前10位
n,s= input(),"" for i in range (10): s += n[i] print(s)
2026-04-04
0
7
题解 | 支付宝消费打折
n,k = map(int,input().split()) a = list(map(int,input().split())) b = list(map(int,input())) for i in range(n): if b[i] == 1: a[i]*=0.95 a...
2026-03-21
0
21
题解 | 括号配对问题
s = input() stack =[] for c in s: if c =='[' or c =='(': stack.append(c) elif c ==']'or c ==')': if len(stack) ==0: ...
2026-03-15
0
21
题解 | 小红的整数配对
n,k = map(int,input().split()) a = list(map(int,input().split())) a.sort() i = n-1 score = 0 while i>=1: if abs(a[i]-a[i-1])<=k: sco...
2026-03-14
0
23
题解 | 讨厌鬼进货
n,x = map(int,input().split()) total = 0 a = list(map(int,input().split())) b = list(map(int,input().split())) for i in range(n): total += min(a[i...
2026-03-14
0
22
题解 | 最大的差
m = int(input()) n = list(map(int,input().split())) n.sort() max_dif = n[-1]-n[0] print(max_dif)
2026-03-13
0
21
题解 | 校门外的树
#include<bits/stdc++.h> using namespace std; int main(){ int L,M,sum = 0; cin>>L>>M; vector<int> removed(L+1,0); ...
2026-03-13
0
18
题解 | 机器翻译
#include<bits/stdc++.h> using namespace std; int main(){ int m,n,miss = 0; deque<int> dic; cin>>m>>n; for(int ...
2026-03-13
1
22