我很荣幸,将题解发了上来 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;char s[1001];int main(){ int l,n; ci…… 题解列表 2023年01月11日 0 点赞 2 评论 398 浏览 评分:7.0
最简约易懂求平方根 摘要:解题思路:一直迭代注意事项:迭代参考代码:a=float(input())x1=a/2x2=(x1+a/x1)/2while abs(x1-x2)>0.00001: x1=x2 x2=(x…… 题解列表 2023年01月11日 1 点赞 0 评论 852 浏览 评分:9.9
线性筛解法,时间复杂度仅为O(n) 摘要:###线性筛解法,时间复杂度仅为O(n)### ```cpp #include using namespace std; const int N = 1e6 + 5; …… 题解列表 2023年01月11日 0 点赞 0 评论 346 浏览 评分:0.0
完数的判断 c++代码 摘要: #include #include #include using namespace std; signed main()…… 题解列表 2023年01月11日 0 点赞 0 评论 326 浏览 评分:0.0
1192一行解(Python) 摘要:参考代码:import sysfor line in sys.stdin : print(f"{int(line)}-->{str(bin(int(line)).replace('0b'…… 题解列表 2023年01月11日 0 点赞 0 评论 418 浏览 评分:4.0
关于“金银岛”的普通解法 摘要:关于“金银岛”的普通解法 前言:刚学完贪心算法初步,本来想看看大佬们的代码,但是题解很少也看不懂(~—~),所以只好自己写。代码及思路可能比较low,欢迎各位大佬斧正! 大致思路: 1.用一…… 题解列表 2023年01月11日 1 点赞 2 评论 782 浏览 评分:9.9
想了几种办法,这种最耗时最少 摘要:解题思路:while循环语句,if判断语句注意事项:认真参考代码:#include "stdio.h"int main(){ int m,n; int sum=0; int num; scanf("…… 题解列表 2023年01月11日 0 点赞 0 评论 382 浏览 评分:0.0
较麻烦的动态二维数组 摘要://思路是相同家庭的人存储在动态二维数组后面//大家可以调试看一下就会明白,调试的时候很简单明了//因为编者是菜鸟,欢迎大家批评指正#includeusing namespace std;struct…… 题解列表 2023年01月11日 0 点赞 0 评论 423 浏览 评分:6.0
一直不习惯用while,这次解出来啦 摘要:解题思路:用while语句,if判断语句,奇数的判断方法语句余数不为零即可注意事项:别忘了题目给的数字范围哦参考代码:#include "stdio.h"int main(){ int m,n; in…… 题解列表 2023年01月11日 0 点赞 0 评论 408 浏览 评分:0.0
用筛法求之N内的素数(水题) 摘要:```c #include int isprime(int n){ int i; if(n…… 题解列表 2023年01月11日 0 点赞 0 评论 333 浏览 评分:0.0