C语言训练-求s=a+aa+aaa+aaaa+aa...a的值 (C语言代码)太简洁了 O(n) 摘要:解题思路: 比如给定a=2,n=3:就是2+22+222 = 246; 题解列表 2018年11月07日 1 点赞 0 评论 901 浏览 评分:0.0
C语言训练-斐波纳契数列 (C语言代码)DP 摘要:解题思路: 最后别递归(因为重复子问题太多了),除非你用记忆化递归 T = O(nlogn); & 题解列表 2018年11月07日 0 点赞 0 评论 1080 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题5.5 (C语言代码) 摘要:解题思路:有惊吓注意事项:参考代码:#include<stdio.h>int main(){int x,y;scanf("%d",&x);if(x<1){ y=x;}if(1<=x&&x<…… 题解列表 2018年11月07日 1 点赞 0 评论 597 浏览 评分:0.0
C语言训练-求函数值 (C语言代码)一行 摘要:解题思路:注意事项:参考代码:#include <cstdio> #include <cstring> #include <string> #include <cmath> #include …… 题解列表 2018年11月07日 0 点赞 0 评论 868 浏览 评分:0.0
C语言训练-求函数值 (C语言代码)只能死板递归? 摘要:解题思路:虽然提交错误,但我也把代码贴出来;这里我处理了重叠子问题;提高了效率; 但是就是不通过。注意事项:参考代码:#include <cstdio> #include <cstring> #…… 题解列表 2018年11月07日 0 点赞 0 评论 760 浏览 评分:0.0
C语言训练-计算1~N之间所有奇数之和 (C语言代码)记得高中的等差数列吗 T=O(1) 摘要:解题思路:等差数列前n项和:(首项+末项)x (项数) /2 首项: 1 末项: N 或 N-1 (N为奇数时末项就为N,为偶数时末项就为N-…… 题解列表 2018年11月08日 2 点赞 0 评论 1255 浏览 评分:0.0
蓝桥杯算法提高VIP-欧拉函数 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int t(int n){ int ans = n; for(int i = 2;i * i <= n;i ++) {…… 题解列表 2018年11月08日 1 点赞 0 评论 1215 浏览 评分:0.0
蓝桥杯算法提高VIP-单词个数统计 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main( ){ char a[20]; int b = 1; scanf("%s"…… 题解列表 2018年11月08日 0 点赞 0 评论 738 浏览 评分:0.0
C语言训练-字符串正反连接 (C++代码)C++之string类的特性 摘要:解题思路:注意事项:参考代码:#include <cstdio> #include <cstring> #include <string> #include <cmath> #include …… 题解列表 2018年11月08日 1 点赞 0 评论 992 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题10.4 (C语言代码) 摘要:解题思路: 通过取余循环遍历数组注意事项: 设置好移动后第一个需要打印的数位置 move=count-move;参考代码:#include"stdio.h" in…… 题解列表 2018年11月08日 0 点赞 0 评论 676 浏览 评分:0.0