Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
3484 | 吴奕希 | 只出现一次的字符 | C++ | Accepted | 60 MS | 492 KB | 475 | 2024-06-08 18:01:45 |
# include<iostream> using namespace std; string s1; char a; int main(){ getline(cin, s1); int s = s1.size(); while(s>0){ bool f = true; a = s1[0]; for(int i = 1; i < s; i++){ if(s1[i]==a){s1=s1.erase(i, 1); i--; s = s1.size(); f = false;} } if(f){cout<<a;return 0;} s1=s1.erase(0, 1); s = s1.size(); } cout<<"no"; return 0; }