Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
61337 lixinyu 找第一个只出现一次的字符 C++ 通过 0 MS 252 KB 267 2025-02-28 15:37:03

Tests(1/1):


#include<bits/stdc++.h> using namespace std; int main() { char a[100005]; cin>>a; int b[26]; for(int i=0;i<strlen(a);i++){ b[a[i]-'a']++; } for(int i=0;i<strlen(a);i++){ if(b[a[i]-'a']==1) { cout<<a[i]; return 0; } } return 0; }


测评信息:

输入

                    

输出

                    

答案

                    

系统信息

exit code: 0, checker exit code: 0