题解列表

筛选

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变量来递推保存数……

三个字符串的排序

摘要:解题思路:直接使用sort排列就好了注意事项:参考代码:a=[[0 for i in range(3)] for j in range(3)]for i in range(3):    a[i]=in……

自定义函数之整数处理

摘要:解题思路:a,b=b,a  实现互换注意事项:参考代码:a = list(map(int,input().strip().split()))a=list(a)b=a.index(min(a))a[0]……

自定义函数之数字后移

摘要:解题思路:利用pop()实现数字转移注意事项:参考代码:m=int(input())x=list(map(int,input().split()))n=int(input())for i in ran……