蓝桥杯算法提高VIP-多项式输出-题解(C++代码)-详细思路 摘要:解题思路:先判断0的情况,如果当前a[i]是0,则跳过.然后判断是不是在最后一位 如果不是就判断是不是-1,-1很特殊如果第一位就只打印‘-’,如果不是第一位就不打印(因为我的正负号是单独打印的),然…… 题解列表 2020年08月04日 0 点赞 0 评论 683 浏览 评分:9.9
The 3n + 1 problem -题解(C语言代码) 摘要:# MarkDown编辑器基本使用说明 ```cpp ``` #include #include using namespace std; /** 步骤: (1)定义a,b表示区间…… 题解列表 2020年08月04日 0 点赞 0 评论 810 浏览 评分:8.0
二级C语言-求偶数和-题解(C语言代码) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <malloc.h>int main(){ int n,a[10],sum=0; scanf("%d",&n); f…… 题解列表 2020年08月04日 0 点赞 0 评论 350 浏览 评分:0.0
[编程入门]有规律的数列求和-题解(C语言代码) 摘要:解题思路:数列求和,采用递归的想法,S(n)=S(n-1)+A(n),那么当数列给定的时候,只需要求出A(n)的表达式即可。由此题可得,A(n)=1+(1/A(n-1))注意事项:参考代码:#incl…… 题解列表 2020年08月04日 0 点赞 0 评论 301 浏览 评分:0.0
二级C语言-等差数列-题解(C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,sum=0; scanf("%d" ,&n); for(int i=1;i<=n;i++) sum…… 题解列表 2020年08月04日 0 点赞 0 评论 338 浏览 评分:0.0
二级C语言-分段函数-题解(C语言代码) 摘要:解题思路:if {}else if{}的越简单用法注意事项:参考代码:#include<stdio.h>int main(){ int x; scanf("%d" ,&x); if(x<1){ pr…… 题解列表 2020年08月04日 0 点赞 0 评论 299 浏览 评分:0.0
[编程入门]报数问题-题解(C语言代码) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int n,tt=0,num=0;//tt是推出淘汰的人数,num是用来报数的; int a…… 题解列表 2020年08月04日 0 点赞 0 评论 521 浏览 评分:0.0
字符串的输入输出处理-题解(C语言代码) 摘要:输入:第一行是一个正整数N,最大为100。之后是多行字符串(行数大于N), 每一行字符串可能含有空格,字符数不超过1000。输出:先将输入中的前N行字符串(可能含有空格)原样输出,再将余下的字符串(不…… 题解列表 2020年08月04日 0 点赞 3 评论 1040 浏览 评分:8.7
蓝桥杯2019年第十届真题-特别数的和-题解(C语言代码) 摘要:#include<stdio.h> int main() { int n,i,j,cou=0,sum=0; scanf("%d",&n); for(i=1;i<=n;i++) {…… 题解列表 2020年08月04日 0 点赞 2 评论 1336 浏览 评分:9.9
P1047-题解(C++代码) 摘要:简单递归版本 ```cpp #include using namespace std; int _max(int *a,int n,int k){ //求n个数中插k个乘号的最大值…… 题解列表 2020年08月04日 0 点赞 0 评论 941 浏览 评分:6.5