题解列表

筛选

Sn的公式求和

摘要:解题思路:  循环+pow函数因为每个数的每一位上都是2,故联想到for循环取出每一个数将每一个数存在a中,利用for循环相加注意事项:参考代码:# include <stdio.h># includ……

简单点--字符提取

摘要:解题思路:简单思路,没有用自定义注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char str[100]; gets(str); i……

校门外的树

#includeusingnamespacestd;intmain(){intL,M,x,y,num=0;chara[10001]={0};//1代表种树,0代表没有树cin>>L>>M;for(inti=0;i>x>>y;for(inti=x;i

自定义函数之数字分离

#include#includeusingnamespacestd;voidfun(inti){inta,b,c,d;a=i%10;//个位b=i/10%10;//十位c=i/100%10;//百位d=i/1000;//千位cout