Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
93531 | 万隽宇 | 只出现一次的字符 | C++ | Accepted | 6 MS | 492 KB | 444 | 2024-10-17 18:42:25 |
#include<iostream> // cin\cout\endl #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() using namespace std; string a; int main(){ int b[26]={0}; getline(cin,a); int len=a.length(); for(int i=0;i<len;i++){ b[a[i]-'a']++; } for(int i=0;i<len;i++){ if(b[a[i]-'a']==1){ cout<<a[i]; return 0; } } cout<<"no"; return 0; }