Submission #37795983
Source Code Expand
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace atcoder;
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
#define chmax(x,y) x = max(x,y);
#define chmin(x,y) x = min(x,y);
const int di[] = {-1, 0, 1, 0};
const int dj[] = {0, -1, 0, 1};
const int INF = 1001001001;
const ll LINF = 1001002003004005006ll;
const double PI = acos(-1);
int main() {
int t;
cin >> t;
rep(ti,t) {
int n;
cin >> n;
int ans = 0;
rep(i,n) {
int a;
cin >> a;
if (a%2 == 1) ans++;
}
cout << ans << endl;
}
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - Multi Test Cases |
| User | taki0711 |
| Language | C++ (GCC 9.2.1) |
| Score | 200 |
| Code Size | 709 Byte |
| Status | AC |
| Exec Time | 11 ms |
| Memory | 3536 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 00_sample_00.txt |
| All | 00_sample_00.txt, 01_random_00.txt, 01_random_01.txt, 02_max_00.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00_sample_00.txt | AC | 11 ms | 3448 KiB |
| 01_random_00.txt | AC | 5 ms | 3536 KiB |
| 01_random_01.txt | AC | 5 ms | 3388 KiB |
| 02_max_00.txt | AC | 8 ms | 3400 KiB |