Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
96371 | Kevin | 只出现一次的字符 | C++ | Accepted | 2 MS | 360 KB | 302 | 2024-11-07 15:26:49 |
#include <bits/stdc++.h> using namespace std; char s[100000]; int c[26]; int main() { gets(s); int len=strlen(s); for(int i=0;i<len;i++){ c[s[i]-'a']++; } for(int i=0;i<len;i++){ if(c[s[i]-'a']==1){ printf("%c\n",s[i]); return 0; } } printf("no\n"); return 0; }