题解列表

筛选

1972: 最大数字(C语言)

摘要:解题思路:当输入n = 143329,k = 1 ---> 432219k = 2 ---> 43229k = 3 ---> 4329这里我们假设有两个映射函数f(n, k), g(n)f(n , k……

字符串分类统计

摘要:#include <stdio.h>int main(){ int num=0,blank=0,word=0,other=0; char a; while((a=getchar())!=&#39;\n……

清晰明了的C语言代码

摘要:解题思路:代码已经很清晰明了了,这里解释一下为什么循环后需要减去最后的高度m假设一组数据是  m:1000   n:1 ,结合下面的代码, 如果不减去 最后的m结果是 :  500 ,1500小球的状……

用到两个数组

摘要:解题思路:一直输出第一个数组,当到达指定位置时,输出第二个数组注意事项:参考代码:#include <stdio.h>int main(){    char a[1000],b[1000];    i……

C语言训练-最大数问题

摘要:解题思路:注意事项:参考代码:a = 1alist = []while a:    alist += list(map(int, input().split()))    if -1 in alist……

素数问题python

摘要:解题思路:注意事项:参考代码:n = int(input())if n == 1:    print(0)else:    flag = 1    for j in range(2,n//2+1): ……

[出圈]幸存者问题

摘要:解题思路:注意事项:参考代码:while True:    try:        a, b = map(int, input().strip().split())        l = [i for……

简单的代码

摘要:解题思路:用一个for循环总起,再接两个分支,分别对正负数进行操作注意事项:参考代码:#include <stdio.h>#include <stdlib.h>int main(){   int a[……

排序方法找最值

摘要:解题思路:先将第一个数当做最大值存起来,再遍历数组,每出现比之前存起来的数更大的就更换一次最大值注意事项:最后输出下标要减一参考代码:#include <stdio.h>#include <stdli……