| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 62612 | 张江鹏 | 统计字符数量 | C++ | Compile Error | 0 MS | 0 KB | 278 | 2023-12-24 17:00:24 |
#include<bits/stdc++.h> using namespice std; int main(){ char c[1001]; cin>>c; int n=strlen(c); int a[128]={0}; for(int i=0;i<n;i++){ a[c[i]]++; } int mx=97; for(int i=97;i<123;i++){ if(a[i]<a[mx]){ mx=i; } } cout<<(char)mx<<" "<<a[mx]; }
Main.cc:2:7: error: expected nested-name-specifier before 'namespice'
using namespice std;
^
Main.cc: In function 'int main()':
Main.cc:5:2: error: 'cin' was not declared in this scope
cin>>c;
^
Main.cc:5:2: note: suggested alternative:
In file included from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:74:0,
from Main.cc:1:
/usr/include/c++/5/iostream:60:18: note: 'std::cin'
extern istream cin; /// Linked to standard input
^
Main.cc:9:9: warning: array subscript has type 'char' [-Wchar-subscripts]
a[c[i]]++;
^
Main.cc:17:2: error: 'cout' was not declared in this scope
cout<<(char)mx<<" "<