Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
62504 张誉腾 统计字符数量 C++ Compile Error 0 MS 0 KB 298 2023-12-24 10:59:23

Tests(0/0):


Code:

#include<iostream> #include<cstring> using namespace std; int tong[128] ={0} int main(){ char c[1001]; scanf("%s",c); int n=strlen(c); for(int i=0;i<n;i++){ tong[c[i]]++; } char tt=0; for(int i=0;i<128;i++){ if(tong[i]>tong[tt]){ tt=i; } } cout<<tt<<" "<<tong; }


Run Info:

Main.cc:5:1: error: expected ',' or ';' before 'int'
 int main(){
 ^