关键点 不能重复计算 摘要:n=int(input())def rec(cur,n): global res for x in range(cur,n): if n%x==0 and n//x>=x: …… 题解列表 2023年10月15日 0 点赞 0 评论 1015 浏览 评分:7.3
ddd看这里,三位数反转,一眼就懂,不懂包教会 摘要:解题思路:分离百位,十位,个位数字注意事项:输出一定得加“\n”,要不然第二轮测试点过不了参考代码:#includeint main(){ // int a,b; // while(~sc…… 题解列表 2023年10月17日 1 点赞 4 评论 862 浏览 评分:7.3
最短的代码 摘要:while True: line = input().strip() if line == '0': break numbers = l…… 题解列表 2023年10月18日 0 点赞 0 评论 445 浏览 评分:7.3
不重复输出的关键是,前面的数比后面的大 摘要:n=int(input())t=ndef rec(n,res): if n<1: if len(res)==1: return for k,x …… 题解列表 2023年10月26日 0 点赞 0 评论 786 浏览 评分:7.3
画矩形(一般思路) 摘要:解题思路:先定义变量,字符是char,分为两种情况,第一种为实心,i,j代表行和列,然后直接输出特定字符,第二种为空心,i,j代表行和列,在指定行列(第一行最后一行,最后一行,最后一列)输出特定字符,…… 题解列表 2023年10月31日 0 点赞 0 评论 600 浏览 评分:7.3
2805: 乘方计算 摘要:``` #include using namespace std; int main(){ int a,n,sum; cin>>a>>n; sum=1; for(int i=0;…… 题解列表 2023年11月05日 0 点赞 0 评论 368 浏览 评分:7.3
2767: 计算多项式的值 摘要:解题思路:注意事项:先输x后写abcd参考代码:#includeusing namespace std;int main(){ double a,b,c,d,x; cin >>x>>a>>…… 题解列表 2023年11月05日 0 点赞 2 评论 335 浏览 评分:7.3
自定义函数之字符串连接 摘要:解题思路:这段代码实现的是两个字符串的连接功能。首先,让我们分析mystrcat函数:while(*ch1)循环会一直执行,直到ch1指向的字符是空字符(也就是字符串的结尾)。这个循环的作用是找到ch…… 题解列表 2023年11月08日 0 点赞 1 评论 513 浏览 评分:7.3
2822: 求分数序列和 摘要:``` #include using namespace std; int main(){ int n; double c=0,sum=0,a=3,b=2,c1=2,y=0; cin…… 题解列表 2023年11月10日 0 点赞 0 评论 297 浏览 评分:7.3
新手思路解法 摘要:参考代码:#include<iostream>using namespace std;int N = 10001;int main(){ int n,a[N][3]; cin>>n; …… 题解列表 2023年11月17日 0 点赞 0 评论 634 浏览 评分:7.3