zhenghaoHoney @ 2024-08-21 11:19:18
#include<iostream>
#include<cstring>
using namespace std;
char a[1110],b[1110];
int cnt;
int main(){
cin.getline(a,110);
int len=strlen(a);
for(int i=0;a[i]!='\0';i++)
{
for(int j=0;a[j]!='\0';j++)
{
if(a[i]==a[j]&&i!=j)
{
break;
}
if(j==len-1&&a[i]!=a[j])
{
cout<<a[i];
return 0;
}
}
}
cout<<"no";
return 0;
}
by zhenghaoHoney @ 2024-08-21 11:20:23
测试数据过了
by Finner_forgeter @ 2024-08-21 11:25:55
@zhenghaoHoney 你只输入了110位
by Finner_forgeter @ 2024-08-21 11:27:33
这是记录AC,就在getline里加一个0就可以
by zhenghaoHoney @ 2024-08-21 11:34:38
@Finner_forgeter okok,谢谢大佬