Self Defence Training Solution || Codechef Starters - 28

         

Self Defence Training Solution 

Codechef Starters - 28
Problem Code : SELFDEF

Solution :

#include <bits/stdc++.h>
#define ll long long int
#define ull unsigned long long int
using namespace std;

void solve()
{
    ll n;
    cin >> n;
    ll ans = 0;
    for (ll i = 0; i < n; i++)
    {
        ll age;
        cin >> age;
        if (age >= 10 && age <= 60)
        {
            ans++;
        }
    }
    cout << ans << "\n";
}

int main()
{
    ll t;
    cin >> t;
    while (t--)
    {
        solve();
    }
}

Comments