Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
135776 李明秦 只出现一次的字符 C++ Accepted 6 MS 488 KB 546 2025-11-08 14:45:27

Tests(10/10):


Code:

#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 a[26]; string s; int main() { getline(cin,s); for(int i=0; i<s.size(); i++) { a[s[i]]++; } for(int i=0; i<s.size(); i++) { if(a[s[i]]==1) { cout<<s[i]; return 0; } } cout<<"no"; return 0; }