#include <iostream>
#include <string>
#include <cstring>
using namespace std;
int T;
string str;
int _count[26];
char cc;
int main()
{
cin>>T;
while(T--)
{
cin>>str;
memset(_count,0,sizeof(_count));
for(int i = 0;i < str.length(); i ++)
{
_count[str[i]-'A']++;
}
for(int i = 0; i < 26; i++)
{
cc= 'A'+i;
if(_count[i]!=0)
{
if(_count[i] == 1)
cout<<cc;
else
cout<<_count[i]<<cc;
}
}
if(T!=1)
cout<<endl;
}
return 0;
}
hdu1020
最新推荐文章于 2024-04-02 18:05:21 发布