题解列表

筛选

二级C语言-同因查找

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i; for(i=10;i<=1000;i++) if(i%2==0&&i%3==0&&i%7==0) ……

c++求和训练

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ double a,b,c,sum=0,sqrt=0,s……

STL解法 vector<pair<int ,int>> 然后再 sort

摘要:解题思路:    前两个数相加即vector元素个数,pair将两个数据组合成一个元素,v.push_back后 sort注意:    make_pair()是函数 别写成<>参考代码:/******……

c++水仙花数判断

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int a = 0; for(int i=100;i<=……

连续输入用重复执行解决

摘要:解题思路:模板给的开头和结尾还是很有用的遇到连续输入还好是还是要尽量用一下while true:try:except:break挺好用注意事项:参考代码:while True:    try:    ……

递归初体验

摘要:解题思路:感觉很不错的样子,看了朋友的理解好像有点懂,没什么问题吧,问题简化初始化,看看尽头是什么过程又是什么注意事项:参考代码:def fun(n):    if n==1:        retu……