题解列表

筛选

正在路上,每一步都是生活

摘要:解题思路:利用递推,在原有的数末位添加注意事项:参考代码:n=int(input())a=[0]*(n+1)a[1]= 8for i in range(2,n+1):    a[i]=8*a[i-1]……

2869: 字符串最大跨距

摘要:解题思路:注意事项:参考代码:l = list(input().strip().split(","))a = l[0].find(l[1])b = l[0].rfind(l[2])if a != -1……

本题不是排序,不是排序

摘要:重要的事情说三遍,本题很坑,因为这道题不是让你排序,其实是找到最大值和最小值然后和数组首元素和尾元素交换位置即可,其他元素不用管。 ```c #include #include void ……

解 2872: 字符环

摘要:解题思路:注意事项:参考代码:a,b=input().strip().split()a = a + ab = b + bna = len(a)nb = len(b)c = 0if na < nb:  ……

2873: 字符串p型编码

摘要:解题思路:注意事项:参考代码:s = input().strip()s = s + "a"n = len(s)i = 0while i != n-1:    c = 1    while s[i] =……

1756: 整数奇偶排序

摘要:```cpp #include using namespace std; int px(long long a[]){ int j[10],o[10],x=0,y=0; for(int ……