Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
61941 李远扬 只出现一次的字符 C++ Accepted 4 MS 496 KB 300 2023-12-16 14:35:58

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ string s; cin >>s; int len = s.size(); int t[127] = {0}; for(int i = 0;i < len; i++){ t[s[i]]++; } for(int i = 0;i < len; i++){ if(t[s[i]]==1){ cout<<s[i]; return 0; } } cout<<"no"; return 0; }