Problem:
鶴ヶ城
会津若松市のシンボルである鶴ヶ城は、蒲生氏郷が本格的な天守閣を築城し、「鶴ヶ城」と名付けました。天守閣からは会津盆地が一望できます。また、晴れた日には、白虎隊で有名な飯盛山の山頂から鶴ヶ城を見ることができます。
会津若松市の今後の広報活動の参考にするため、鶴ヶ城に訪れた来場者について、年代調査をすることにしました。来場者の年齢を入力とし、下記の年齢区分別に人数を出力するプログラムを作成してください。
区分
年齢
10歳未満
0  ~ 9
10代
10  ~ 19
20代
20  ~ 29
30代
30  ~ 39
40代
40  ~ 49
50代
50  ~ 59
60歳以上
60  ~
Input
複数のデータセットの並びが入力として与えられます。入力の終わりはゼロひとつの行で示されます。
 各データセットは以下の形式で与えられます。
n
a
1
a
2
:
a
n
1 行目に来場者の人数
n
(1 ≤
n
≤ 1000000)、続く
n
行に
i
人目の来場者の年齢
a
i
( 0 ≤
a
i
≤ 120 ) が与えられます。
Output
データセット毎に以下の形式で人数を出力します。
1 行目: 10 歳未満の人数
2 行目: 10 代の人数
3 行目: 20 代の人数
4 行目: 30 代の人数
5 行目: 40 代の人数
6 行目: 50 代の人数
7 行目: 60 歳以上の人数
Sample Input
8
71
34
65
11
41
39
6
5
4
67
81
78
65
0
Output for the Sample Input
2
1
0
2
1
0
2
0
0
0
0
0
0
4

Submitted solutions:

code_snippet: #line 1 "/opt/library/template.hpp"
#include <bits/stdc++.h>
using namespace std;

using ll = long long;
using i64 = long long;
using u32 = unsigned int;
using u64 = unsigned long long;
using i128 = __int128;
using u128 = unsigned __int128;
using f128 = __float128;

template <class T>
constexpr T infty = 0;
template <>
constexpr int infty<int> = 1'000'001'000;
template <>
constexpr ll infty<ll> = ll(infty<int>) * infty<int> * 2;
template <>
constexpr u32 infty<u32> = infty<int>;
template <>
constexpr u64 infty<u64> = infty<ll>;
template <>
constexpr i128 infty<i128> = i128(infty<ll>) * infty<ll>;
template <>
constexpr double infty<double> = infty<ll>;
template <>
constexpr long double infty<long double> = infty<ll>;
#define inf infty<ll>

using pi = pair<ll, ll>;
using vi = vector<ll>;
using vvi = vector<vector<ll>>;
template <class T>
using vc = vector<T>;
template <class T>
using vvc = vector<vc<T>>;
template <class T>
using vvvc = vector<vvc<T>>;
template <class T>
using vvvvc = vector<vvvc<T>>;
template <class T>
using vvvvvc = vector<vvvvc<T>>;
template <class T>
using pq = priority_queue<T>;
template <class T>
using pqg = priority_queue<T, vector<T>, greater<T>>;

#define vv(type, name, h, ...) \
  vector<vector<type>> name(h, vector<type>(__VA_ARGS__))
#define vvv(type, name, h, w, ...)   \
  vector<vector<vector<type>>> name( \
      h, vector<vector<type>>(w, vector<type>(__VA_ARGS__)))
#define vvvv(type, name, a, b, c, ...)       \
  vector<vector<vector<vector<type>>>> name( \
      a, vector<vector<vector<type>>>(       \
             b, vector<vector<type>>(c, vector<type>(__VA_ARGS__))))

#define rep1(a) for (ll _ = 0; _ < (ll)(a); ++_)
#define rep2(i, a) for (ll i = 0; i < (ll)(a); ++i)
#define rep3(i, a, b) for (ll i = a; i < (ll)(b); ++i)
#define rep4(i, a, b, c) for (ll i = a; i < (ll)(b); i += (c))
#define rrep1(a) for (ll i = (a)-1; i >= (ll)(0); --i)
#define rrep2(i, a) for (ll i = (a)-1; i >= (ll)(0); --i)
#define rrep3(i, a, b) for (ll i = (b)-1; i >= (ll)(a); --i)
#define rrep4(i, a, b, c) for (ll i = (b)-1; i >= (ll)(a); i -= (c))
#define overload4(a, b, c, d, e, ...) e
#define rep(...) overload4(__VA_ARGS__, rep4, rep3, rep2, rep1)(__VA_ARGS__)
#define rrep(...) overload4(__VA_ARGS__, rrep4, rrep3, rrep2, rrep1)(__VA_ARGS__)

#define all(x) (x).begin(),(x).end()
#define len(x) (ll)(x.size())
#define elif else if
#define bit(x, i) (((x)>>(i))&1)

#define eb emplace_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second

#define stoi stoll
#define abs llabs

#define MIN(v) *min_element(all(v))
#define MAX(v) *max_element(all(v))
#define LB(c, x) distance((c).begin(), lower_bound(all(c), (x)))
#define UB(c, x) distance((c).begin(), upper_bound(all(c), (x)))
#define UNIQUE(x) \
  sort(all(x)), x.erase(unique(all(x)), x.end()), x.shrink_to_fit()

ll popcnt(ll x) { return __builtin_popcountll(x); }
ll popcnt(u64 x) { return __builtin_popcountll(x); }
ll popcnt_mod_2(ll x) { return __builtin_parityll(x); }
ll popcnt_mod_2(u64 x) { return __builtin_parityll(x); }
ll topbit(ll x) { return (x == 0 ? -1 : 63 - __builtin_clzll(x)); }
ll topbit(u64 x) { return (x == 0 ? -1 : 63 - __builtin_clzll(x)); }
ll lowbit(ll x) { return (x == 0 ? -1 : __builtin_ctzll(x)); }
ll lowbit(u64 x) { return (x == 0 ? -1 : __builtin_ctzll(x)); }

template <typename T>
T floor(T a, T b) {
  return a / b - (a % b && (a ^ b) < 0);
}
template <typename T>
T ceil(T x, T y) {
  return floor(x + y - 1, y);
}
template <typename T>
T bmod(T x, T y) {
  return x - y * floor(x, y);
}
template <typename T>
pair<T, T> divmod(T x, T y) {
  T q = floor(x, y);
  return {q, x - q * y};
}

template<typename T> T SUM(const vector<T> &A) {
  T s = 0; for (auto &&a: A) s += a;
  return s;
}

template <typename T>
T POP(queue<T> &que) {
  T a = que.front();
  que.pop();
  return a;
}
template <typename T>
T POP(deque<T> &que) {
  T a = que.front();
  que.pop_front();
  return a;
}
template <typename T>
T POP(pq<T> &que) {
  T a = que.top();
  que.pop();
  return a;
}
template <typename T>
T POP(pqg<T> &que) {
  T a = que.top();
  que.pop();
  return a;
}
template <typename T>
T POP(vc<T> &que) {
  T a = que.back();
  que.pop_back();
  return a;
}

template <typename F>
ll binary_search(F check, ll ok, ll ng, bool check_ok = true) {
  if (check_ok) assert(check(ok));
  while (abs(ok - ng) > 1) {
    auto x = (ng + ok) / 2;
    (check(x) ? ok : ng) = x;
  }
  return ok;
}
template <typename F>
f128 binary_search_real(F check, f128 ok, f128 ng, ll iter = 100) {
  rep(iter) {
    f128 x = (ok + ng) / 2;
    (check(x) ? ok : ng) = x;
  }
  return (ok + ng) / 2;
}

// ? は -1
vc<int> s_to_vi(const string &S, char first_char) {
  vc<int> A(S.size());
  rep(i, S.size()) { A[i] = (S[i] != '?' ? S[i] - first_char : -1); }
  return A;
}

template <typename T, typename U>
vc<T> cumsum(vc<U> &A, ll off = 1) {
  ll N = A.size();
  vc<T> B(N + 1);
  rep(i, N) { B[i + 1] = B[i] + A[i]; }
  if (off == 0) B.erase(B.begin());
  return B;
}

// stable sort
template <typename T>
vi argsort(const vector<T> &A) {
  vi ids(len(A));
  iota(all(ids), 0);
  sort(all(ids),
       [&](ll i, ll j) { return (A[i] == A[j] ? i < j : A[i] < A[j]); });
  return ids;
}

// A[I[0]], A[I[1]], ...
template <typename T>
vc<T> rearrange(const vc<T> &A, const vi &I) {
  vc<T> B(len(I));
  rep(i, len(I)) B[i] = A[I[i]];
  return B;
}

template<typename T> inline bool chmax(T &a, T b) {return ((a<b)?(a=b,true):(false));}
template<typename T> inline bool chmin(T &a, T b) {return ((a>b)?(a=b,true):(false));}

inline void wt(const char c) { cout << c; }
inline void wt(const string s) { cout << s; }
inline void wt(const char *s) { cout << s; }

template <typename T>
void wt_integer(T x) {
  cout << (x);
}
template <typename T>
void wt_real(T x) {
  cout << fixed << setprecision(15) << (long double)(x);
}
template <typename T>
void wt_integer128(T x) {
  char buf[64];
  char *d = end(buf);
  d--; *d = '\0';
  __uint128_t tmp = ((x < 0)? -x : x);
  do {
    d--; *d = char(tmp%10 + '0'); tmp /= 10;
  } while (tmp);
  if (x < 0) {
    d--; *d = '-';
  }
  cout << d;
}

inline void wt(int x) { wt_integer(x); }
inline void wt(ll x) { wt_integer(x); }
inline void wt(i128 x) { wt_integer128(x); }
inline void wt(u32 x) { wt_integer(x); }
inline void wt(u64 x) { wt_integer(x); }
inline void wt(u128 x) { wt_integer128(x); }
inline void wt(double x) { wt_real(x); }
inline void wt(long double x) { wt_real(x); }
inline void wt(f128 x) { wt_real(x); }

template <class T, class U>
void wt(const pair<T, U> val) {
  wt(val.first); wt(' '); wt(val.second);
}
template <size_t N = 0, typename T>
void wt_tuple(const T t) {
  if constexpr (N < std::tuple_size<T>::value) {
    if constexpr (N > 0) { wt(' '); }
    const auto x = std::get<N>(t);
    wt(x);
    wt_tuple<N + 1>(t);
  }
}
template <class... T>
void wt(tuple<T...> tpl) {
  wt_tuple(tpl);
}
template <class T, size_t S>
void wt(const array<T, S> val) {
  auto n = val.size();
  for (size_t i = 0; i < n; i++) {
    if (i) wt(' ');
    wt(val[i]);
  }
}
template <class T>
void wt(const vector<T> val) {
  auto n = val.size();
  for (size_t i = 0; i < n; i++) {
    if (i) wt(' ');
    wt(val[i]);
  }
}

void print() { wt('\n'); }
template <class Head, class... Tail>
void print(Head &&head, Tail &&... tail) {
  wt(head);
  if (sizeof...(Tail)) wt(' ');
  print(forward<Tail>(tail)...);
}

void YES(bool t = 1) { print(t ? "YES" : "NO"); }
void NO(bool t = 1) { YES(!t); }
void Yes(bool t = 1) { print(t ? "Yes" : "No"); }
void No(bool t = 1) { Yes(!t); }
void yes(bool t = 1) { print(t ? "yes" : "no"); }
void no(bool t = 1) { yes(!t); }
void onez(bool t = 1) { print(t ? 1 : 0); }
#define endl '\n'
#define dump(x) {cerr << #x " = " << x << '\n';}
#line 2 "main.cpp"

int solve();
int main() {
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  while (!solve()) {}
  return 0;
}

int solve() {
  ll n, a;
  cin >> n;
  if (n == 0) return 1;
  vi cnt(7, 0);
  rep(n) {
    cin >> a;
    cnt[min(a/10, 6LL)]++;
  }
  rep(i, len(cnt)) print(cnt[i]);
  return 0;
}
accuracy: 1
time_ms: 40
memory_kb: 3220
final_rank: 4

code_snippet: #pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;

mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
ll myRand(ll B) {
    return (ull)rng() % B;
}
inline double time() {
    return static_cast<long double>(chrono::duration_cast<chrono::nanoseconds>(chrono::steady_clock::now().time_since_epoch()).count()) * 1e-9;
}

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    int n;
    while (cin >> n, n) {
        vector<int> v(7);
        for (int i = 0; i < n; ++i) {
            int a; cin >> a;
            if (a >= 60) v.back() += 1;
            else v[a/10] += 1;
        }
        for (int i = 0; i < 7; ++i) {
            cout << v[i] << "\n";
        }
    }
}
accuracy: 1
time_ms: 40
memory_kb: 3144
final_rank: 3

code_snippet: #include<bits/stdc++.h>
using namespace std;
int main(){
    int n, a, sum[11];
    while(cin >> n, n!=0){
        memset(sum, 0, sizeof(sum));
        for(int i=0;i<n;i++){
            cin >> a;
            if(a>=60) sum[6]++;
            else sum[a/10]++;
        }
        for(int i=0;i<7;i++) cout << sum[i] << endl;
    }
    return(0);
}
accuracy: 1
time_ms: 120
memory_kb: 2980
final_rank: 9

code_snippet: #include <bits/stdc++.h>
using namespace std;
using ll = long long;

int main(){
    int n;
    while(cin >> n, n){
        int v;
        vector<int> cnt(7);
        while(n--){
            cin >> v;
            cnt[min(6, v / 10)]++;
        }
        for(auto v:cnt)cout << v << '\n';
    }
}
accuracy: 1
time_ms: 90
memory_kb: 3344
final_rank: 7

code_snippet: #include<bits/stdc++.h>
using namespace std;

int main(){
  for(;;){
    int N;
    cin >> N;
    if(N == 0) break;
    vector<int> ans(7,0);
    for(int i=0;i<N;i++){
      int a;
      cin >> a;
      if(a <= 9) ans[0]++;
      else if(a <= 19) ans[1]++;
      else if(a <= 29) ans[2]++;
      else if(a <= 39) ans[3]++;
      else if(a <= 49) ans[4]++;
      else if(a <= 59) ans[5]++;
      else ans[6]++;
    }
    for(int i=0;i<7;i++) cout << ans[i] << endl;
  }
}
accuracy: 1
time_ms: 90
memory_kb: 3168
final_rank: 5

code_snippet: #define _USE_MATH_DEFINES
#include<iostream>
#include<string>
#include<sstream>
#include<regex>
#include<vector>
#include<stack>
#include<queue>
#include<set>
#include<map>
#include<list>
#include<algorithm>
#include<numeric>
#include<cmath>
#include<iomanip>
#include<random>
using namespace std;
#define int long long
#define uint unsigned long long
const int mod=1e9+7;
const int inf=mod*mod;
const double eps=1e-10;
signed main(){
	int n;
	while(cin>>n,n){
		int a,c1=0,c2=0,c3=0,c4=0,c5=0,c6=0,c7=0;
		for(int i=0;i<n;i++){
			cin>>a;
			if(a<10)
				c1++;
			else if(a<20)
				c2++;
			else if(a<30)
				c3++;
			else if(a<40)
				c4++;
			else if(a<50)
				c5++;
			else if(a<60)
				c6++;
			else
				c7++;
		}
		cout<<c1<<endl<<c2<<endl<<c3<<endl<<c4<<endl<<c5<<endl<<c6<<endl<<c7<<endl;
	}
}
accuracy: 1
time_ms: 90
memory_kb: 3364
final_rank: 8

code_snippet: #include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;
int main() {
	int n;
	while (cin >> n, n) {
		int cnt[7]{};
		rep(i, n) {
			int d; cin >> d;
			if (d >= 60)cnt[6]++;
			else cnt[d / 10]++;
		}rep(i, 7)cout << cnt[i] << endl;
	}
}
accuracy: 1
time_ms: 120
memory_kb: 3048
final_rank: 11

code_snippet: #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main(){
    while(1){
        int n;
        cin >> n;
        if(n == 0) break;

        vector<int> ans(7, 0);
        for(int i=0; i<n; i++){
            int a;
            cin >> a;
            ans[min(a/10, 6)]++;
        }
        for(int i: ans){
            cout << i << endl;
        }
    }
    return 0;
}
accuracy: 1
time_ms: 90
memory_kb: 3288
final_rank: 6

code_snippet: #include <iostream>

int getIndex(int age)
{
	if (age<10) return 0;
	else if (age<20) return 1;
	else if (age<30) return 2;
	else if (age<40) return 3;
	else if (age<50) return 4;
	else if (age<60) return 5;
	else return 6;
}

int main()
{
	int n;
	while (true) {
		std::cin >> n;
		if (n == 0) break;
		int a[7] = {0,0,0,0,0,0,0};
		for (int i=0; i<n; i++) {
			int age;
			std::cin >> age;
			a[getIndex(age)]++;
		}
		for (int i=0; i<7; i++) std::cout << a[i] << std::endl;
	}
	return 0;
}
accuracy: 1
time_ms: 130
memory_kb: 2996
final_rank: 15

code_snippet: #include <cstdio>
#include <string>
#include <algorithm>
using namespace std;
int main() {
    int n, t;
    int arr[7];
    for (; ;) {
        scanf("%d", &n);
        if (n == 0) break;
        fill(arr, arr+7, 0);
        for (int i = 0; i < n; i++) {
            scanf("%d", &t);
            t/=10;
            if (t >= 6) arr[6]++;
            else arr[t]++;
        }
        for (int i = 0; i<= 6; i++) printf("%d\n", arr[i]);

    }
    return 0;
}
accuracy: 1
time_ms: 50
memory_kb: 2676
final_rank: 1

code_snippet: #include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <cmath>

static const int MOD = 1000000007;
using ll = long long;
using u32 = unsigned;
using u64 = unsigned long long;
using namespace std;

template<class T> constexpr T INF = ::numeric_limits<T>::max()/32*15+208;

int main() {
    int n;
    while(cin >> n, n){
        vector<int> a{10, 20, 30, 40, 50, 60, 200};
        vector<int> v(n);
        vector<int> cnt(7);
        for (auto &&i : v) {
            scanf("%d", &i);
            for (int j = 0; j < 7; ++j) {
                if(i < a[j]){
                    cnt[j]++;
                    break;
                }
            }
        }
        for (int i = 0; i < 7; ++i) {
            cout << cnt[i] << "\n";
        }
    }
    return 0;
}
accuracy: 1
time_ms: 60
memory_kb: 6748
final_rank: 18

code_snippet: #include <bits/stdc++.h>

using namespace std;

int Result[7];

int main() {
	int n, age;

	while (cin >> n, n) {
		memset(Result, 0, sizeof(Result));

		for (int i = 0; i < n; i++) {
			cin >> age;

			age /= 10;
			if (age > 6) {
				age = 6;
			}
			Result[age]++;
		}

		for (int i = 0; i < 7; i++) {
			cout << Result[i] << endl;
		}
	}
	

	return 0;
}
accuracy: 1
time_ms: 120
memory_kb: 3088
final_rank: 13

code_snippet: #include <bits/stdc++.h>

using namespace std;

int Result[7];



int main() {
	int n, age;

	while (cin >> n, n) {
		memset(Result, 0, sizeof(Result));

		for (int i = 0; i < n; i++) {
			cin >> age;
			if (age < 10) {
				Result[0]++;
			}
			else if (age < 20) {
				Result[1]++;
			}
			else if (age < 30) {
				Result[2]++;
			}
			else if (age < 40) {
				Result[3]++;
			}
			else if (age < 50) {
				Result[4]++;
			}
			else if (age < 60) {
				Result[5]++;
			}
			else {
				Result[6]++;
			}
		}

		for (int i = 0; i < 7; i++) {
			cout << Result[i] << endl;
		}
	}
	

	return 0;
}
accuracy: 1
time_ms: 120
memory_kb: 2996
final_rank: 10

code_snippet: #include <bits/stdc++.h>
using namespace std;
int main(void){
    int n,a,count1,count10,count20,count30,count40,count50,count60;
    count1=0;
    count10=0;
    count20=0;
    count30=0;
    count40=0;
    count50=0;
    count60=0;
    while (cin>>n) {
        if (n==0) {
            break;
        } else {
            for (int i=0;i<n;i++) {
                cin>>a;
                if (a<10) {
                    count1++;
                } else if (a>=10&&a<20) {
                    count10++;
                } else if (a>=20&&a<30) {
                    count20++;
                } else if (a>=30&&a<40) {
                    count30++;
                } else if (a>=40&&a<50) {
                    count40++;
                } else if (a>=50&&a<60) {
                    count50++;
                } else if (a>=60) {
                    count60++;
                }
            }
        }
        cout<<count1<<endl;
        cout<<count10<<endl;
        cout<<count20<<endl;
        cout<<count30<<endl;
        cout<<count40<<endl;
        cout<<count50<<endl;
        cout<<count60<<endl;
        count1=0;
        count10=0;
        count20=0;
        count30=0;
        count40=0;
        count50=0;
        count60=0;
    }
}
accuracy: 1
time_ms: 120
memory_kb: 3088
final_rank: 13

code_snippet: #include <iostream>
#include <string.h>
using namespace std;

int n;
int p[7];

int main()
{
	cin >> n;

	while (n) {
		memset(p, 0, sizeof(p));

		for (int i = 0; i < n; i++) {
			int a;
			cin >> a;

			a /= 10;

			if (a > 5)
				p[6]++;
			else
				p[a]++;
		}

		for (int i = 0; i < 7; i++)
			cout << p[i] << endl;

		cin >> n;
	}

	return 0;
}
accuracy: 1
time_ms: 130
memory_kb: 3000
final_rank: 16

code_snippet: #include<iostream>
using namespace std;
int t[7],n,a;
int main(void){
    while(cin>>n&&n){
    for(int i=0;i<7;i++)t[i]=0;
    for(int i=0;i<n;i++){
        cin>>a;
        for(int j=0;j<7;j++){
            if(j*10<=a&&a<=j*10+9){
                t[j]++;
                break;
            }
            if(j==6)t[6]++;
        }
    }
    for(int i=0;i<7;i++){
        cout<<t[i]<<endl;
    }
  }
}
accuracy: 1
time_ms: 160
memory_kb: 3104
final_rank: 17

code_snippet: #include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <utility>
#include <cstring>
#include <iomanip>
#include <numeric>
#include <limits>
#include <cmath>
#include <cassert>
#include <map>
using namespace std;
using ll = long long;

const int INF = 1<<30;
const int MOD = (int)1e9 + 7;
const int MAX_N = (int)1e5 + 5;
#define debug(x) cout << #x << ": " << x << endl

signed main(void)
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n;
    while(cin >> n, n)
    {
        vector<int> cnt(7, 0);
        for(int i = 0; i < n; i++)
        {
            int x; cin >> x;
            bool flag = false;
            for(int age = 10; age <= 60; age += 10)
            {
                if(x < age)
                {
                    cnt[age / 10 - 1]++;
                    flag = true;
                    break;
                }
            }
            if(flag == false) cnt[6]++;
        }
        for(int i = 0; i < 7; i++) cout << cnt[i] << endl;
    }
    return 0;
}
accuracy: 1
time_ms: 40
memory_kb: 3128
final_rank: 2

code_snippet: #include <iostream>
using namespace std;
int main(void){
#define MAX 1001000
    int n; //来場者数
    int a[MAX]; //来場者の年齢

    while(true){
        cin >> n;
        if(n == 0) break;

        for(int i = 0; i < n; i++)
            cin >> a[i];
        
        int c0 = 0, c1 = 0, c2 = 0, c3 = 0, c4 = 0, c5 = 0, c6 = 0;
        //10代未満の人数、10代の人数、20代の人数、30代の人数、40代の人数、50代の人数、60歳以上の人数
        for(int i = 0; i < n; i++){
            if(a[i] < 10) 
                c0++;
            else if(10 <= a[i] && a[i] < 20)
                c1++;
            else if(20 <= a[i] && a[i] < 30)
                c2++;
            else if(30 <= a[i] && a[i] < 40)
                c3++;
            else if(40 <= a[i] && a[i] < 50)
                c4++;
            else if(50 <= a[i] && a[i] < 60)
                c5++;
            else
                c6++;
        }
        cout << c0 << endl;
        cout << c1 << endl;
        cout << c2 << endl;
        cout << c3 << endl;
        cout << c4 << endl;
        cout << c5 << endl;
        cout << c6 << endl;
    }
}
accuracy: 1
time_ms: 120
memory_kb: 6988
final_rank: 20

code_snippet: #define _CRT_SECURE_NO_WARNINGS
#include "bits/stdc++.h"
using namespace std;
#define rep(i, n) for(int i=0; i<(n); ++i)
#define FOR(i, m, n) for(int i=(m); i<(n); ++i)
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(),(x).end()
#define mp make_pair
#define pb push_back
#define Cout(x) cout << (x) << endl
#define Cout2(x, y) cout << (x) << " " << (y) << endl
#define dump(x) cout << #x << " = " << (x) << endl;
#define forauto(i, a) for(auto i : a)cout << i << " "; puts("");
typedef long long LL;
typedef vector<int> VI;
typedef vector<LL> VL;
typedef vector<string> VS;
typedef vector<bool> VB;
typedef vector<vector<int>> VVI;
typedef pair<int, int> PII;
const int inf = 1e9;
const double pi = acos(-1.0);

int main() {
	int n;
	while (cin >> n && n) {
		VI a(n); rep(i, n)cin >> a[i];
		VI data(9);

		rep(i, n) {
			int x;
			if (a[i] < 10)x = 0;
			else if (a[i] < 20)x = 1;
			else if (a[i] < 30)x = 2;
			else if (a[i] < 40)x = 3;
			else if (a[i] < 50)x = 4;
			else if (a[i] < 60)x = 5;
			else x = 6;

			data[x]++;
		}

		rep(i, 7)cout << data[i] << endl;
	}
}
accuracy: 1
time_ms: 120
memory_kb: 6684
final_rank: 19

code_snippet: #include<iostream>
using namespace std;

int main()
{
    int n, d, a[13];

    while( cin >> n )
    {
        if( n == 0 )
            break;

        for( int i = 0; i < 13; i++ )
            a[i] = 0;

        for( int i = 0; i < n; i++ )
        {
            cin >> d;
            a[d/10]++;
        }

        for( int i = 0; i < 6; i++ )
            cout << a[i] << endl;

        int sum = 0;
        for( int i = 6; i < 13; i++ )
            sum += a[i];
            
        cout << sum << endl;
    }
    return 0;
}
accuracy: 1
time_ms: 120
memory_kb: 3080
final_rank: 12