提出 #15176813


ソースコード 拡げる

#include <iostream>
#include <vector>
using namespace std;

int main() {
  int N;
  cin >> N;

  vector<int> vec(N);
  for (int i = 0; i < N; i++) {
    cin >> vec.at(i);
  }

  int count = 0;

  for (int i = 1; i <= N; i++) {
    if (i % 2 == 1 && vec.at(i - 1) % 2 == 1) {
      count++;
    }
  }

  cout << count << endl;
}

提出情報

提出日時
問題 B - An Odd Problem
ユーザ eithernot
言語 C++ (GCC 9.2.1)
得点 200
コード長 351 Byte
結果 AC
実行時間 9 ms
メモリ 3480 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 2
AC × 7
セット名 テストケース
Sample sample_01.txt, sample_02.txt
All random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, sample_01.txt, sample_02.txt
ケース名 結果 実行時間 メモリ
random_01.txt AC 9 ms 3420 KiB
random_02.txt AC 3 ms 3432 KiB
random_03.txt AC 2 ms 3480 KiB
random_04.txt AC 3 ms 3420 KiB
random_05.txt AC 3 ms 3428 KiB
sample_01.txt AC 3 ms 3388 KiB
sample_02.txt AC 3 ms 3448 KiB