initial commit

This commit is contained in:
ShazidMahsrafi 2023-06-07 20:14:28 +06:00
parent bede1a87ef
commit 5a8c2924b1

21
158A-NextRound/158A.cpp Normal file
View File

@ -0,0 +1,21 @@
#include <bits/stdc++.h>
using namespace std;
int main()
{
int i, j, n, k, count=0;
cin >> n >> k;
int s[n];
for (i = 0; i < n; i++)
{
cin >> s[i];
}
for(i=0;i<n;i++)
{
if (s[i] > 0 && s[i]>=s[k-1])
{
count++;
}
}
cout << count;
}