https://www.acmicpc.net/problem/1978
#include <bits/stdc++.h>
using namespace std;
//소수 찾기
int main() {
bool prime = true;
int n, arr[100], cnt = 0;
cin >> n;
for (int i=0; i<n; i++) {
cin >> arr[i];
}
for (int i=0; i<n; i++) {
if (arr[i] == 1) {
prime = false;
}
else {
for (int j=2; j*j<=arr[i]; j++) {
if (arr[i] % j == 0) {
prime = false;
break;
}
}
}
if (prime) cnt++;
else prime = true;
}
printf("%d", cnt);
}