1852: 求1+2+3+...+n的值(重温旧题) 摘要://函数 #include <bits/stdc++.h> using namespace std; long long aaaa(int n) { int sum =0; …… 题解列表 2023年11月29日 0 点赞 0 评论 235 浏览 评分:2.0
c代码记录之验证字串 摘要:1.空串是所有字符串的子串,但这题好像不验证这个 2.gets不通过,scanf能通过 #include #include int main() { …… 题解列表 2023年11月30日 0 点赞 1 评论 274 浏览 评分:2.0
求平方差个数(超时可参考) 摘要:`解题方法:多列几组关于平方的等式,然后观察规律 ` `例如: 1=1²-0² 5=3²-2² 2 6 3=2²-1² 7=…… 题解列表 2023年11月30日 0 点赞 0 评论 348 浏览 评分:2.0
Yu校门外的树(差分+前缀和) 摘要:# 解题思路 简单循环模拟题解很多人发过了,我这里提供一种高效方法。 # 参考代码 ```c++ #include using namespace std; int main() {…… 题解列表 2023年12月01日 0 点赞 0 评论 139 浏览 评分:2.0
Yu:1464: 蓝桥杯基础练习VIP-分解质因数 摘要:**解题思路:** 这道题虽然要求找到质因数,但其实不需要判断质数。 因为每个合数都可以拆解为n个质数,你只要从小到大的分解每个因数,就不存在合数。 例:8 = 2 * 2 * 2,…… 题解列表 2023年12月01日 0 点赞 0 评论 174 浏览 评分:2.0
题解 2771: 大象喝水 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ double h,r; cin>>h>>r; …… 题解列表 2023年12月02日 0 点赞 0 评论 145 浏览 评分:2.0
编写题解 2771: 大象喝水 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ double h,r; cin>>h>>r; …… 题解列表 2023年12月03日 0 点赞 0 评论 139 浏览 评分:2.0
2806人口增长问题题解(c++) 摘要:#include using namespace std; int main(){ int b; double a; cin>>a>>b; for(int i=1;i…… 题解列表 2023年12月04日 0 点赞 0 评论 215 浏览 评分:2.0
1031: [编程入门]自定义函数之字符串反转 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h> //strlen求字符串长度是要用int main(){ char c[1005]; gets(…… 题解列表 2023年12月04日 0 点赞 0 评论 159 浏览 评分:2.0
计算鞍点——使用三个列表 摘要:解题思路:一个列表放每一行的最大值,一个列表放这一行最大数值的列数,一个放每一列的最小值。然后判断这一行的最大值与最大值所在列数的最小值是否相等,相等的话输出行列数。注意事项:参考代码:a = [li…… 题解列表 2023年12月05日 0 点赞 0 评论 221 浏览 评分:2.0