1 条题解

  • 0
    @ 2026-5-31 11:28:02

    #include<bits/stdc++.h> using namespace std; int main() { int s1=0,s2=0,s3=0,s4=0 ,n; cin>>n; for(int i=1;i<=n;i++) { int x; cin>>x; if(x<=18&&x>=0) { s1++; } if(x<=35&&x>=19) { s2++; }
    if(x<=60&&x>=36) { s3++; } if(x>=61) { s4++; } } cout<<fixed<<setprecision(2)<<(double)s1/n100<<"%"<<endl; cout<<fixed<<setprecision(2)<<(double)s2/n100<<"%"<<endl; cout<<fixed<<setprecision(2)<<(double)s3/n100<<"%"<<endl; cout<<fixed<<setprecision(2)<<(double)s4/n100<<"%"<<endl; return 0; }


    • 1

    信息

    ID
    215
    时间
    1000ms
    内存
    256MiB
    难度
    5
    标签
    递交数
    33
    已通过
    14
    上传者