Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
71009 黎瑾萱 只出现一次的字符 C++ Accepted 4 MS 504 KB 270 2024-04-20 17:40:47

Tests(10/10):


Code:

#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"; return 0; }