Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
326791 沈心 【C2-6】统计数字 C++ 通过 100 1 MS 252 KB 320 2025-06-14 14:59:40

Tests(1/1):


#include<bits/stdc++.h> using namespace std; int main(){ int n,a,e3=0,r4=0,t5=0; cin>>n; for(int i=1;i<=n;i++){ cin>>a; if(a>=100 && a<=999){ e3+=1; } else if(a>=1000 && a<=9999){ r4+=1; } else if(a>=10000 && a<=99999){ t5+=1; } } cout<<e3<<" "<<r4<<" "<<t5; return 0; }


测评信息: