题解列表

筛选

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……

自定义函数之字符串反转

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

统计数字字符个数

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char a[256]; gets(a); int i=0,sum=0; w……

C++STL之Priority_queue(优先队列)

摘要:解题思路:C++STL之Priority_queue(优先队列)注意事项:参考代码:#include<iostream>#include<queue>#include<vector>#include<……

蓝桥杯历届试题-数字游戏题解

摘要:解题思路:关键是求出递推数通过等差数列。注意事项:第一次我用arr数组来递推保存数据,结果是运行错误的原因是后面的测试数据超过了arr数组的最大长度,所以不能用数组来保存数据,改用了b变量来递推保存数……