1151: C语言训练-计算一个整数N的阶乘 摘要:注意 0 的阶乘是 1。#include<bits/stdc++.h> using namespace std; void f(int &n){ if(n==0){ …… 题解列表 2022年01月18日 0 点赞 0 评论 357 浏览 评分:0.0
蓝桥杯算法提高VIP-理财计划 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cstdio>#include<math.h>using namespace std;int main(){ …… 题解列表 2022年01月18日 0 点赞 0 评论 467 浏览 评分:0.0
优秀的拆分,方法都会,注意细节即可,考察递归思想 摘要:解题思路: 一般来说,一个正整数可以拆分成若干个正整数的和。例如,1 = 1,10 = 1 + 2 + 3 + 4 等。 对于正整数 n 的一种特定拆分,我们称它为“优秀的”,当且仅当…… 题解列表 2022年01月17日 1 点赞 3 评论 803 浏览 评分:10.0
c++打印图案代码 摘要:解题思路:格式化输出就好了。注意事项:无参考代码:#include<bits/stdc++.h>using namespace std;int main(){printf(" *\n");print…… 题解列表 2022年01月17日 0 点赞 35 评论 1214 浏览 评分:9.9
蓝桥杯算法提高VIP-淘淘的名单 超简单 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ string s; int N; cin>>N; …… 题解列表 2022年01月17日 0 点赞 0 评论 384 浏览 评分:0.0
校门外的树 c++ 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int main(){ int L,M; cin>>L>>M; bool a[L+1]={f…… 题解列表 2022年01月17日 0 点赞 0 评论 377 浏览 评分:0.0
无敌巨简单版本,一个公式解决!!! 摘要:解题思路:直接上公式了:输入 a,b买不到的最大数目就是 a*b-a-b;借鉴了一下一位大佬的解释,尝试理解吧用题目中给出的7和4来举例,当一个数k<7时,只能用4,除了4其他的都无法组成;当7<k<…… 题解列表 2022年01月16日 0 点赞 1 评论 1107 浏览 评分:9.9
买不到的数目 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a,b; while(cin>>a>>b){ if(a<=1…… 题解列表 2022年01月16日 0 点赞 0 评论 346 浏览 评分:0.0
[编程入门]有规律的数列求和-题解(C++代码) 摘要:解题思路:for语句循环注意事项:参考代码:#include<iostream>#include<iomanip>using namespace std;int main(){ double a…… 题解列表 2022年01月16日 0 点赞 0 评论 355 浏览 评分:0.0
简单易懂的递归倒置字符数组 摘要:#include #include #include using namespace std; int n; string s; void swapalpha(int r,int l) {…… 题解列表 2022年01月16日 0 点赞 0 评论 505 浏览 评分:6.0