题解列表

筛选

2981: 二进制分类

摘要:解题思路:int er(int a){   int sum1=0,sum0=0,b=a;   for(;;)   {       if(b%2==1)       {           sum1++……

超简单代码

摘要:解题思路:宏定义 a%b得到答案即可注意事项:参考代码:#include<iostream>using namespace std;#define s(a,b) a%b;//宏定义规则int main……

C++ 归并排序

摘要: #include #include using namespace std; int main() { int a; cin >> a;//输入整数个数 ……

猴子吃桃的问题

摘要:解题思路:      从剩下一个桃那天一直反推前一天的桃子数,直到求出第一天桃子总数注意事项:参考代码:#include<iostream>           using namespace st……

使用pow()函数求幂次方

摘要:解题思路:pow() 方法  double pow (double x,double y);参数说明:x:双精度数。底数y:双精度数。指数返回值:x 的 y 次方的值例如: pow( 3 , 4 ) ……