2544一行解(Python) 摘要:注意事项:用sum直接计算列表中的值得和,input()得到的内容为str类型,range(N,M)左闭右开参考代码:print(sum(range(int(input())+1)))…… 题解列表 2022年11月06日 0 点赞 0 评论 354 浏览 评分:9.9
最大公约数与最小公倍数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a, b; int i; scanf("%d %d", &a, &b); f…… 题解列表 2022年11月06日 0 点赞 0 评论 279 浏览 评分:9.9
2904: 谁拿了最多奖学金(c++代码) 摘要:```cpp #include using namespace std; typedef struct Stu { string name; int g1; int g2; ch…… 题解列表 2022年11月06日 0 点赞 0 评论 496 浏览 评分:9.9
输出亲朋字符串(c++) 摘要:```cpp #include using namespace std; int main(){ string s; getline(cin,s);//此函数可读取整行,包括…… 题解列表 2022年11月06日 1 点赞 2 评论 739 浏览 评分:9.9
想了解此题用数组怎么解进来看看 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a[3000]={0},j,i; for(i=1;i<=3000;i++) { for(j=1…… 题解列表 2022年11月06日 0 点赞 0 评论 1080 浏览 评分:9.9
1251: 统计字母个数(c++代码) 摘要:```cpp #include using namespace std; int main(){ string s; int a[123]={};//定义一个数组来存储字母个…… 题解列表 2022年11月06日 0 点赞 0 评论 448 浏览 评分:9.9
用辗转相除法求最大公约数 摘要:解题思路:用辗转相除法求最大公约数,再用这两个数相乘除以最大公约数即得最小公倍数注意事项:辗转相除法即为m与n求最大公约数 m与n求模,再把n的值赋给m,把求出来的模赋值给n 直到模为0,即n为最大公…… 题解列表 2022年11月06日 0 点赞 0 评论 558 浏览 评分:9.9
C语言,看看就好,这个循环确实不好想 摘要:想法很简单,就是不好实现,可能有些朋友会想到n个for循环套用,但是发现不会实现或者很难,所以在这里优化了一下循环的算法(当然也是借鉴了一下别人的,哈哈),下面代码看看就好 #includ…… 题解列表 2022年11月06日 0 点赞 1 评论 496 浏览 评分:9.9
有问题的测试点QAQ 摘要:解题思路:按照题目意思做即可注意事项:有个测试点是错误的,加个if就行了参考代码:#include<bits/stdc++.h> using namespace std; double n,m; …… 题解列表 2022年11月06日 0 点赞 1 评论 684 浏览 评分:9.9
P1371(C++题解) 摘要:解题思路:暴力搜索加最优化剪枝注意事项:不想填(滑稽)参考代码:#include<cstdio> #include<cstring> #include<iostream> using names…… 题解列表 2022年11月06日 0 点赞 1 评论 304 浏览 评分:9.9