Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
122864 | 林嘉乐 | 只出现一次的字符 | C++ | Accepted | 5 MS | 492 KB | 549 | 2025-06-21 17:10:33 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int a[26]={0}; string s; getline(cin,s); for(int i;i<s.length();i++){ a[s[i]-'a']++; } for(int i=0;i<s.length();i++){ if(a[s[i]-'a']==1){ cout<<s[i]<<endl; return 0; } } cout<<"no"<<endl; return 0; }