摘要: #include<stdio.h>#include<string.h>int main(){ int a; scanf("%d",&a); int a10=0; int mult=1; while(a){ a10+=mult*(a%10); mult*=8; a/=10; } printf("%d\n",a10); return 0;} 阅读全文
posted @ 2012-04-18 20:32 逝者*恋世 阅读(152) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>#include<stdio.h>#include<string.h>#define N 80using namespace std;int main(){ char test[N]; int counta=0,counte=0,counti=0,counto=0,countu=0; gets (test); int i; for(i=0;i<N && test[i]!='\0';i++){ if(test[i]=='a') counta++; else if(test 阅读全文
posted @ 2012-04-18 20:26 逝者*恋世 阅读(166) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <cmath>using namespace std;int find(int x){ int i; for(i = 1; ;i++){ if(pow((double)2, i-1) <= x && x < pow((double)2, i)) return i; }}int main(){int n, high, m, low;int nCount, i;while (cin >> m >> n && m && n){nCount 阅读全文
posted @ 2012-04-18 19:47 逝者*恋世 阅读(127) 评论(0) 推荐(0) 编辑