题解列表

筛选

题解 3003: 鸡兔同笼问题

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){   int a,b;   cin>>a>>b;   cout<<(4*……

邮票组合问题及C语言

摘要:为什么其他发表者的文章写得那么复杂? 参考代码: #include int main() { int a=4,b=3,sum; sum=4+3+……

分解质因数 易懂方法

摘要:解题思路:嵌套循环解法,辗转相除法这一题的感觉cpp解法较少,细节较多,还请多多指教参考代码:int a,b;scanf("%d %d",&a,&b);for(int i = a;i<=b;i++) ……

此为ST模板(有dp)

摘要:解题思路: 就是普通的st表先学习这个就是ST表的模板,学会ST这个就是很简单的注意事项:参考代码:#include#include#include#includeusing namespace st……

第几项 最简单的方法

摘要:解题思路:以m>s来判断循环的始终,每轮增加n,然后累加到s即可注意事项:参考代码:int m;int n = 0,s = 0;scanf("%d",&m);while (m>s){    n++; ……