80
查看原帖
80
1296064
gaoyuchen929sm楼主2025/1/24 19:36
#include<iostream>
using namespace std;
char c[26]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
int d[26];
int main()
{
	string str;
	cin>>str;
	for(int i=0;i<str.size();i++)
	{
		for(int j=0;j<26;j++)
		{
			if(str[i]==c[j])
			{
				d[j]++;
			}
		}
	}
	for(int i=0;i<26;i++)
	{
		if(d[i]==1)
		{
			cout<<c[i];
			return 0;
		}
	}
	cout<<"no";
	return 0;
}
2025/1/24 19:36
加载中...