C++ 代码
#include<cstdio>
#include<iostream>
using namespace std;
int main(void)
{
int n,i,x;
int in = 0,out = 0;
cin >> n;
for(i=1;i<=n;i++)
{
scanf("%d",&x);
if(x>=10&&x<=20) in++;
else out++;
}
printf("%d in\n%d out\n",in,out);
return 0;
}