Submission #97082

#TimeUsernameProblemLanguageResultExecution timeMemory
97082karlopuhTelefoni (COCI17_telefoni)C++14
80 / 80
51 ms460 KiB
#include <bits/stdc++.h> using namespace std; int n,d,cnt,rj; int main(){ cin>>n>>d; for(int i=0;i<n;i++){ int broj; cin>>broj; if(broj==0){ cnt++; if(cnt==d){ rj++; cnt=0; } }else{ cnt=0; } } cout<<rj; }
#Verdict Execution timeMemoryGrader output
Fetching results...