摘要: #include <iostream> using namespace std; int main() { int n,x,tmp,flag=0; cin>>n>>x; for(int i=1;i<=n;i++) { tmp=i; while(tmp)//数字分离 分离出x flag++ { if( 阅读全文
posted @ 2017-12-13 20:41 张浦 阅读(81) 评论(0) 推荐(0)
摘要: #include <iostream> using namespace std; int main() { int n,m,i,j,k; cin>>m; while(m--)//多组输入 { cin>>n; for(i=1;i<=n;i++) { for(j=i;j<=9;j++) { if(j== 阅读全文
posted @ 2017-12-13 20:35 张浦 阅读(85) 评论(0) 推荐(0)
摘要: 水题一道 也是第一篇博客 欢迎大牛来喷 思路非常简单 把字符串拆为单个数字 譬如算式1+2-3+1998可以拆为1,+2,-3,+1998 将各个数字单独转换为int型 最后求和 #include <iostream> #include <cstring> #include <cmath> usin 阅读全文
posted @ 2017-12-13 11:01 张浦 阅读(108) 评论(0) 推荐(0)