delete pics to save space
This commit is contained in:
27
history_source/信息学奥赛一本通/1.5.1.5.cpp
Normal file
27
history_source/信息学奥赛一本通/1.5.1.5.cpp
Normal file
@ -0,0 +1,27 @@
|
||||
#include<cstdio>
|
||||
using namespace std;
|
||||
double poeple[4];
|
||||
void read(int n)
|
||||
{
|
||||
if(n>=0&&n<=18) poeple[0]++;
|
||||
if(n>=19&&n<=35) poeple[1]++;
|
||||
if(n>=36&&n<=60) poeple[2]++;
|
||||
if(n>=61&&n<=100) poeple[3]++;
|
||||
}
|
||||
int main()
|
||||
{
|
||||
int n;
|
||||
scanf("%d",&n);
|
||||
for(int i=0;i<n;i++)
|
||||
{
|
||||
int x;
|
||||
scanf("%d",&x);
|
||||
read(x);
|
||||
}
|
||||
for(int i=0;i<4;i++)
|
||||
{
|
||||
printf("%.2lf%c\n",poeple[i]*100/n,'%');
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user