제출 #721394

#제출 시각아이디문제언어결과실행 시간메모리
721394vjudge1Telefoni (COCI17_telefoni)C++17
16 / 80
18 ms2004 KiB
#include <bits/stdc++.h> #define F first #define S second #define ll long long #define EB emplace_back using namespace std; const int SIZE = 1e5 + 1; const int MOD = 1e9 + 7; int main() { ios_base::sync_with_stdio(0); cin.tie(nullptr); int n, d; cin >> n >> d; vector<int> M(n + 1); int cnt = 0; for (int i = 1; i <= n; i ++) { cin >> M[i]; } for (int i = 1; i <= n; i += d) { if (M[i] == 0) { cnt ++; } } cout << cnt << "\n"; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...