Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
99068 | 黎瑾萱 | 只出现一次的字符 | C++ | Accepted | 5 MS | 496 KB | 280 | 2024-11-24 11:10:09 |
#include<bits/stdc++.h> using namespace std; string s; int a[1000]; int main(){ getline (cin,s); for(int i=0;i<s.size();i++){ a[s[i]]++; } for(int j=0;j<s.size();j++){ if(a[s[j]]==1){ cout<<s[j]; return 0; } } cout<<"no"<<endl; return 0; }