Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
61939 申明智 只出现一次的字符 C++ Accepted 4 MS 492 KB 293 2023-12-16 14:35:14

Tests(10/10):


Code:

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