Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
72802 冯诚阳 只出现一次的字符 C++ Runtime Error 1 MS 268 KB 367 2024-05-12 18:40:04

Tests(0/10):


Code:

# include<iostream> # include<cstring> using namespace std; string a; int b[128]; int main(){ int a_len,s=0; cin>>a; for(int i=0;i<a.size();i++){ for(int j=0;j<a.size();j++){ if(a[i]==a[j]) b[i]++; } } for(int i=0;i<a.size();i++){ if(b[i]==1){ cout<<a[i]; return 0; } } cout<<"no"; return 0; }


Run Info:

Runtime Error:Segmentation fault