Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
113061 王煜鑫 只出现一次的字符 C++ Accepted 9 MS 492 KB 363 2025-03-15 11:30:09

Tests(10/10):


Code:

#include <bits/stdc++.h> using namespace std; string a; int main() { getline(cin,a); int lin,cnt; lin=a.size(); for(int i=0;i<lin;i++){ cnt=1; for(int j=0;j<lin;j++){ if(i!=j&&a[i]==a[j]){ cnt++; break; } } if(cnt==1){ cout<<a[i]<<endl; return 0; } } cout<<"no"<<endl; return 0; }