Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
160595 Kevin 字符统计 C++ Accepted 1 MS 280 KB 429 2026-09-24 15:43:45

Tests(10/10):


Code:

#include<iostream> #include<cstring> using namespace std; int main() { char a[10005]; cin.getline(a,10005); int len=strlen(a); int dx=0,xx=0,sz=0,kg=0; for(int i=0;i<len;i++){ if(a[i]>='A'&&a[i]<='Z'){ dx++; } else if(a[i]>='a'&&a[i]<='z'){ xx++; } else if(a[i]>='0'&&a[i]<='9'){ sz++; } else if(a[i]==' '){ kg++; } } cout<<dx<<" "<<xx<<" "<<sz<<" "<<kg; return 0; }