#include <iostream>
#include <string>
using namespace std;
int main()
{
string str;
getline(cin,str);
for(unsigned int i=0;i<str.length();++i)
{
char c=str[i];
int counts=1;
for(unsigned int j=0;j<str.length();++j)
{
if(c==str[j])
{
++counts;
}
}
if(counts==2)
{
cout<<c;
return 0;
}
if(i==str.length()-1 && counts!=2)
{
cout<<'.';
return 0;
}
}
return 0;
}
华为(6)第一个只出现一次的字符
最新推荐文章于 2024-01-05 23:21:43 发布