Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
249 B
0
Indexable
Never
#include <iostream>
#include <cmath>
using namespace std;

int main()
{
	int n, k ,s,a;
	cin >> k ;
	n = 0;
	s = 0;
	while (n==0) {
		cin >> a;
		if (a == 0) {
			n = 1;
		}
		else if(a<k) {
			s += 1;

		}
	}
	cout << s;
	
}