Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
122867 罗迎甲 只出现一次的字符 C++ Accepted 4 MS 492 KB 427 2025-06-21 17:25:15

Tests(10/10):


Code:

#include<iostream> #include<cstring> using namespace std; int main(){ int a[26] = {0}; string x; getline(cin, x); int len = x.length(); int c; for(c = 0; c < len; c++) a[x[c] - 'a']++; for(c = 0; c < len; c++) { if(a[x[c] - 'a'] == 1) { cout << x[c] << endl; return 0; } } cout << "no" << endl; return 0; }