#include
using namespace std;
int isa(char c)
{
return ('A' <= c&&c <= 'Z')||('a' <= c&&c <= 'z');
}
int main()
{
char w[10000];//设输入最长不超过10000个字符
intc[51] = { 0 };//设最长的词不超过50个字母
int curl = 0;
int i, s = 0,t=0;
cin.getline(w, 10000);
for (i = 0; i
{
if (isa(w[i] ))
{
curl++;
}
else
{
c[curl]++;
curl = 0;
}
}
for (i = 1; i <= 50; i++)
{
if (c[i])
{
s += i*c[i];
t += c[i];
cout << '(' << i<}
}
cout << s < return 0;
}i am a student
(1,2)
(2,1)
(7,1)
11/4
请按任意键继续. . .