Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
98287 | hby | 只出现一次的字符 | C++ | Runtime Error | 1 MS | 260 KB | 322 | 2024-11-17 19:17:09 |
#include<bits/stdc++.h> #include<cstdio> using namespace std; char a[100]; int main() { int n; gets(a); int len=strlen(a); for(int i=0;i<len;i++){ n=1; for(int j=i+1;j<len;j++){ if(a[i]==a[j]){ n++; } } if(n==1){ cout<<a[i]; return 0; } } cout<<"no"; return 0; }
Runtime Error:Segmentation fault