蓝桥杯2016年第七届真题-四平方和-题解(C++代码)简单暴力稍稍优化即可AC 摘要:解题思路:注意事项:参考代码:/* 时间复杂度:O((n^(3/2))/24) ,在n<=5e6的数据是可以过的 */ #include <iostream> #include <cmath…… 题解列表 2020年11月24日 0 点赞 0 评论 1481 浏览 评分:8.0
[出圈]-题解(Java代码) (递归算法) 摘要:解题思路: 递推算出 f(N,M)=(f(N−1,M)+M)%N N代表人数 M代表报数注意事项:参考代码:import java.util.Scanner; public class M…… 题解列表 2020年11月25日 0 点赞 0 评论 801 浏览 评分:8.0
字符串输入输出函(简单实用)-题解 摘要:解题思路:注意事项:参考代码:#include <stdio.h>void GetReal(double a){ printf("%g\n",a);}void GetString(char a[]){…… 题解列表 2020年11月25日 0 点赞 0 评论 696 浏览 评分:8.0
[编程入门]求和训练-题解(C++代码) 摘要:解题思路:注意事项:我是萌新参考代码:#include <iostream>#include <cstdio>using namespace std;int main(){ double a,…… 题解列表 2020年11月26日 0 点赞 0 评论 882 浏览 评分:8.0
日期换算-题解(C语言代码) 不用判断是否为闰年 直接算天数。 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int a[12]={0,31,28,31,30,31,30,31,31,30,31,30,31}; int …… 题解列表 2020年11月27日 0 点赞 0 评论 955 浏览 评分:8.0
[编程入门]宏定义练习之三角形面积-题解(C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>#define S(a,b,c) (a+b+c)/2#define area(S,a,b,c) …… 题解列表 2020年11月27日 0 点赞 1 评论 1603 浏览 评分:8.0
[编程入门]自定义函数之字符提取-题解(C语言代码) 喜欢用for循环的过来看看! 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h>int main(){ char a[1000],b[1000]; int n,i,j=0; g…… 题解列表 2020年11月29日 0 点赞 0 评论 1656 浏览 评分:8.0
[STL训练]美国大选-题解(C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a[100]; int n,i,j,temp,sum; while(1){ scanf("%d",&n…… 题解列表 2020年11月29日 0 点赞 1 评论 1971 浏览 评分:8.0
[编程入门]自定义函数求一元二次方程-题解(Java代码) 解题思路:了解公式,进行求解注意事项:注意精度,注意小数点后多少位,注意正负号,根号的表示参考代码://x=-b(-/+)Math.sqrt(b*b-4*a*c)/(2*a)//Math.sqrt()为根号//m+ni;m=-b/2*a;n=Math.sqrt(b*b-4*a*c)/(2*a)impo 题解列表 2020年12月01日 0 点赞 0 评论 1752 浏览 评分:8.0
输出M到N的数-题解(C语言代码) 摘要:解题思路:注意事项:注意M=N这种情况;参考代码:#include <stdio.h>int main(){ int M,N,i; scanf("%d%d",&M,&N); if(M<N) for(i…… 题解列表 2020年12月01日 0 点赞 0 评论 1002 浏览 评分:8.0