Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
98015 任斌 只出现一次的字符 C++ Compile Error 0 MS 0 KB 282 2024-11-17 10:54:04

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main() { string a; int n=0; cin>>a; for(int i=0;i<a.length;i++){ n=0; for(int j=i+1;j<a.length;j++){ if(a[i]==a[j])n++; } if(n==0){ cout<<a[i]; return 0; } } cout<<"no"; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:8:18: error: invalid use of member function (did you forget the '()' ?)
  for(int i=0;i