信息学奥赛一本通T1290-采药(01背包) 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;const int MAX = 1001;int T, M;int t[MAX], …… 题解列表 2022年07月29日 0 点赞 0 评论 755 浏览 评分:7.3
列表储存运算 摘要:解题思路:第一行应付格式注意事项:参考代码:n=input() a=list(map(int,input().split())) b=0 for i in a: if i%2==0: …… 题解列表 2022年08月05日 0 点赞 0 评论 376 浏览 评分:7.3
编写题解 1053: 二级C语言-平均值计算(简单易懂的解题方法python) 摘要:解题思路:通过列表的广泛性解题的思路会更加宽阔。注意事项:熟练列表的使用参考代码:a=list(map(int,input().split())) //通过列表同时输入多个值,此时为列表形式 co…… 题解列表 2022年08月10日 0 点赞 0 评论 920 浏览 评分:7.3
1053 简单的解法 摘要:解题思路:如下注意事项:如果复制,请复制过后检查,我提交时是正确的。参考代码:#include<stdio.h>int main(){ int sum=0;//定义 int i,a[11],b=0,c…… 题解列表 2022年08月14日 0 点赞 2 评论 822 浏览 评分:7.3
时间复杂度O(n) 摘要:解题思路:就是分成一层一层的(以高度为1为最底层),每一层需要砍的次数之和就是答案,显然最大不超过64层(long long的上限),所以时间复杂度就是O(n),系数最大不超过64注意事项:参考代码:…… 题解列表 2022年08月21日 0 点赞 0 评论 898 浏览 评分:7.3
质因数分解的模板题 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;typedef long long ll;ll n,ans;void getans(…… 题解列表 2022年08月24日 0 点赞 0 评论 865 浏览 评分:7.3
最大公约数与最小公倍数题解 摘要:解题思路:我们先根据输入的数可以确定约数和倍数肯定是在我们输入的两个数的乘积和1之间,这样我们的循环范围就可以确定了,正向的循环可以找出约数,而且会由大的数覆盖小的数,倍数从小开始找,找到就用brea…… 题解列表 2022年09月01日 0 点赞 0 评论 576 浏览 评分:7.3
编写题解 2779: 输出绝对值 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<iomanip> using namespace std; int main() { doubl…… 题解列表 2022年09月02日 0 点赞 0 评论 1067 浏览 评分:7.3
编写题解 2780: 奇偶数判断 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<iomanip> using namespace std; int main() { int n…… 题解列表 2022年09月02日 0 点赞 0 评论 670 浏览 评分:7.3
纯数学题,没意思 摘要:解题思路:注意事项:参考代码:a, b = map(int, input().split())c = abs(b - a)print(c - (a % c))…… 题解列表 2022年10月06日 2 点赞 4 评论 1412 浏览 评分:7.3