解法有很多,多思考进步才会大 摘要:解题思路:注意事项:参考代码: int n,x,y,s,c; scanf("%d %d %d",&n,&x,&y); //如果经过y时间%吃一个苹果所需时间x==0 //证明说经过的时间刚好…… 题解列表 2023年02月27日 0 点赞 0 评论 197 浏览 评分:0.0
解法有很多,多思考进步才会大 摘要:解题思路:注意事项:参考代码: int n,s=2; scanf("%d",&n); for(int i=0;i<n-1;i++){ s = s * 2; …… 题解列表 2023年02月27日 0 点赞 0 评论 218 浏览 评分:0.0
[编程入门]自定义函数处理素数 摘要:解题思路:注意事项:参考代码:from math import sqrtdef isPrime(n): if n==1: return False for j in rang…… 题解列表 2023年02月27日 0 点赞 0 评论 137 浏览 评分:0.0
[编程入门]水仙花数判断 摘要:解题思路: 1.是个三位数 2.每位数的立方之和等于这个三位数本身 注意事项: 只输出水仙花数,不是水仙花数记得用continue继续for循环查找,直至找到所有水仙花数参考…… 题解列表 2023年02月28日 0 点赞 0 评论 178 浏览 评分:0.0
1030: [编程入门]二维数组的转置 摘要:解题思路:把二维数组转置,也就是把各个元素的列号和行号互换(如arr[1][2]转置后成为arr[2][1])。注意事项:这里不使用新的数组保存转置后的数组,然后再输出。但在函数中转置输出的数组并不改…… 题解列表 2023年02月28日 0 点赞 0 评论 168 浏览 评分:0.0
01背包+二维费用问题 摘要:``` // https://www.dotcpp.com/oj/problem3056.html #include #include #include using names…… 题解列表 2023年02月28日 0 点赞 0 评论 241 浏览 评分:0.0
辗转相除法求最大公因数 摘要:思路: 最小公倍数 = 两个整数的乘积/最大公因数 最小公倍数 辗转相除 代码: #include int main(){ int a, b; …… 题解列表 2023年02月28日 0 点赞 0 评论 191 浏览 评分:0.0
2821: 开关灯 摘要:参考代码:#include<stdio.h> #include<math.h> int main() { int n,m; scanf("%d %d",&n,&m); …… 题解列表 2023年02月28日 0 点赞 0 评论 176 浏览 评分:0.0
2825: 计算多项式的值(C) 摘要:参考代码:#include<stdio.h> #include<math.h> int main() { double x; int n; scanf("%lf…… 题解列表 2023年02月28日 0 点赞 0 评论 281 浏览 评分:0.0
2826: 雇佣兵 摘要:#include<stdio.h> #include<math.h> int main() { int m,n,x; scanf("%d %d %d",&m,&n,&x)…… 题解列表 2023年02月28日 0 点赞 0 评论 174 浏览 评分:0.0