摘要: A题 点击查看代码 #include <bits/stdc++.h> using namespace std; int main(){ int n,m,sum=0; cin>>n>>m; for(int i=0;i<n;i++){ int x; cin>>x; sum+=x; } if(sum<=m 阅读全文
posted @ 2025-07-11 09:33 橙子12345 阅读(8) 评论(0) 推荐(0)
摘要: A题 话不多说,直接遍历,判断是否k<=Ai即可。 代码 点击查看代码 #include <bits/stdc++.h> using namespace std; int a[105]; int main(){ int n,k,ans=0; cin>>n; for(int i=0;i<n;i++) 阅读全文
posted @ 2025-06-23 11:03 橙子12345 阅读(19) 评论(0) 推荐(1)
摘要: A题 题目啰嗦了一点,化简后的题目: 输入一个字符串p和整数l,判断它的长度是否>=l。 注:puts(s)代表输出s并加一个换行。 代码 #include <bits/stdc++.h> using namespace std; int main(){ string s; int k; cin>> 阅读全文
posted @ 2025-06-21 22:31 橙子12345 阅读(19) 评论(0) 推荐(0)