题解列表

筛选

多重背包问题 python题解

摘要:n,m=map(int,input().split())W=[]V=[]#转化为01背包问题,同时减少重复的数据,降低时间复杂度for i in range(n):    a,b,c=map(int,……

五次方数(简单题)

摘要:解题思路:用除十取余法求各个位数,然后就很简单了注意事项:难点在于对于上边界的选取,这里我直接大手一挥,弄了个千万,如果想更快一些的话,可以把他弄小点参考代码:#include <stdio.h>#i……

二级C语言-自定义函数题解

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>double fact(int n){    double s;    if(n==1)      s=……

简单快捷的代码

摘要:解题思路:想办法输入10个值在对比注意事项:参考代码:int main(){ int arr[10],s; int tem; for(s=1;s<=9;s++) { scanf("%d",&arr[……

1015: [编程入门]求和训练

摘要:解题思路:注意事项:注意倒数需用double,以输出浮点数参考代码:#include<stdio.h>int main(){    int a,b,c;    int A=0,B=0;    doub……

1059: 二级C语言-等差数列

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    int a,b;    int n=2;    int sum;    scanf("%d",&a);  ……

巧用数组和字符串来解题

摘要:解题思路:就是简单的字符串和数组的使用注意事项:没啥要注意的参考代码:n=list(input().split( )) str=str(n[0]) n=int(n[1]) sum=0 for ……

c++---阶乘计算

摘要: #include using namespace std; int n; int a[100005]; int main() { ……