题解列表
A+B for Input-Output Practice (II) ,C++解题
摘要:解题思路:用while注意事项:参考代码:#include<iostream>#include<cmath>using namespace std;int main(){ int k; i……
python——直观遍历
摘要:解题思路:n为奇数时:两个对角分别用m和n-m两个方砖填充,对于剩下的两个一样的矩形区域填充,对m从(n+1)/2到n-1遍历n为偶数时:用四个n/2的方砖即可注意事项:注意矩形区域的填充参考代码:#……
简单易懂小学数学思路
摘要:解题思路:先比较m和n的大小,然后向上或向下遍历,根据公约数和公倍数的定义,利用补集思想,解决问题。注意事项:参考代码:#includeint main(){ int m,n,max,min;/……
1089: A+B for Input-Output Practice (V)
摘要:解题思路:双while注意事项:参考代码:#include <iostream>#include <cmath>using namespace std;int main(){ int count……
Python题解最大公约数与最小公倍数
摘要:解题思路:辗转相除注意事项:参考代码:a,b=map(int,input().split())s=a*bwhile a%b: a,b=b,a%bprint(b,s//b)……
2544: N以内累加求和,C++
摘要:解题思路:do while求累加注意事项:参考代码:#include <iostream>using namespace std;int main(){ int n; int sum=0;……
Python题解字符串分类统计
摘要:解题思路:注意事项:参考代码:zm,sz,kg,qt=0,0,0,0s=input()for c in s: if c>='a' and c<='z' or c>……
Python题解阶乘求和
摘要:解题思路:注意事项:参考代码:s,k=1,1n=int(input())for i in range(2,n+1): k*=i s+=kprint(s)……