题解列表

筛选

自定义函数之数字分离

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a; int i,b;    int c[4]; scanf("%d",&a); for(i=0;i<……

1462: 蓝桥杯基础练习VIP-Huffuman树(Java最简思路)

摘要:解题思路:先将题目所给的数据存入数组中并进行排序(我用的是快速排序可以节省更多的时间),再进行数据的求和,利用for循环的限制性要求来限制所取的数,再进行继续排序,最后把所有求和的结果相加,就可以得出……

一个函数,一行代码

摘要: #include int gcd(int a, int b)// 最大公约数 { return !b ? a : gcd(b, a % b); } int lcm(int a,……

2781:奇偶ASCII值判断

摘要:解题思路:注意事项:参考代码:# include <stdio.h>int main(void){ char a; scanf("%c",&a); if(a%2==0) { printf("YES\n……

2765:计算分数的浮点数值

摘要:解题思路:本题解题关键在于后期要把整型a,b转变为浮点型参加除法运算。注意事项:参考代码:# include <stdio.h>int main(){ int a,b; double c; scanf……

最简方法字符逆序

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    int i; char ch[100]; gets(ch); for(i=strlen(ch)-1;i>=……

人口增长问题(简单点)

摘要:解题思路:注意事项:参考代码:#include<iostream>#include<iomanip>using namespace std;int main(){    int n;    doubl……

1秒看懂思路

摘要:解题思路:注意事项:有些数据太大int型无法接收,需要用long型参考代码:import java.util.Scanner;public class Tom数 { public static voi……

python 递归母牛故事

摘要:解题思路:python在运行递归的时候每次取值都会计算一次这样运行速度就十分的缓慢但是如果我们将结果放到缓存那么就可以大大提高它的运行速度注意事项:参考代码:from functools import……