题解列表
使用结构体数组,简单易懂
摘要:解决本题我使用了结构体数组的方法
每一个小结构体数组存储一个大数,每一个大数使用长度为10000的char类型数组存储
然后比较的时候使用选择排序,内部先把要比较的两个数的长度算出来(可以使用st……
使用qsort函数排序
摘要:这道题坑挺多
首先,假如数组元素只有一个,那个只需要把那个元素输出,然后再输出一个-1即可,其次,这道题需要连续输入。
```c
#include
#include
int cmp(co……
4行:万花丛中过,片叶不沾身
摘要:解题思路:再也不想掉进整除的坑了注意事项:参考代码:a=int(input())b=int(input())print(a//b)print(a%b)……
3行:万花丛中过,片叶不沾身
摘要:解题思路:摘一颗苹果,来送给你解渴注意事项:我也不知为何,伤口还没愈合参考代码:a=int(input())b=int(input())print(a*b)……
对于这个问题,直接用找规律,然后根据规律直接求解
摘要:参考代码:#include<stdio.h>int main(){ int n; int mid; scanf("%d",&n); mid=n/2; for(int i=……
对于这个问题,直接用暴力算法,直接求解
摘要:解题思路:注意事项:参考代码:#include<stdlib.h>#include<stdio.h>#include<string.h>#include<math.h>int main(){ i……
A+B for Input-Output Practice (III) C语言代码
摘要:#include<stdio.h>int main(void){ int i, a, b, j; scanf("%d %d", &a, &b); while (!(……
2844: 大整数的因子
摘要:解题思路:注意事项:参考代码:flag = Truen = int(input())for i in range(2,10,1): if n % i == 0: if flag: ……