?? 統計字符.txt
字號:
//test
#include <cstdio>
#include <string>
#include <cmath>
#include <stack>
#include <algorithm>
using namespace std;
int alph[300];
char str[300],str2[300];
void hash() {
int i;
for (i=0;str2[i];i++) {
alph[ str2[i] ] ++;
}
}
int main() {
int i;
while (gets(str)) {
if (str[0] == '#' && str[1] == 0) break;
memset(alph,0,sizeof(alph));
gets(str2);
hash();
for (i=0;str[i];i++) {
printf("%c %d\n",str[i],alph[ str[i] ]);
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -