| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 160396 | Kevin | C语言7.16 | C++ | Accepted | 1 MS | 268 KB | 908 | 2026-09-17 18:46:20 |
#include<iostream> #include<iomanip> #include<cstring> using namespace std; int main() { char a[100],b[100],c[100]; cin.getline(a,100); cin.getline(b,100); cin.getline(c,100); int lena=strlen(a); int lenb=strlen(b); int lenc=strlen(c); int dx=0,xx=0,sz=0,kg=0,ot=0; for(int i=0;i<lena;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++; else ot++; } for(int i=0;i<lenb;i++){ if(b[i]>='A'&&b[i]<='Z') dx++; else if(b[i]>='a'&&b[i]<='z') xx++; else if(b[i]>='0'&&b[i]<='9') sz++; else if(b[i]==' ') kg++; else ot++; } for(int i=0;i<lenc;i++){ if(c[i]>='A'&&c[i]<='Z') dx++; else if(c[i]>='a'&&c[i]<='z') xx++; else if(c[i]>='0'&&c[i]<='9') sz++; else if(c[i]==' ') kg++; else ot++; } cout<<dx<<" "<<xx<<" "<<sz<<" "<<kg<<" "<<ot; return 0; }