You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
375 B

#include <cstdio>
using namespace std;
const int N = 1e6 + 10;
int a[N];
int n;
int main() {
scanf("%d", &n);
for (int i = 0; i < n; i++) scanf("%d", &a[i]);
for (int i = 0; i < n; i++) {
int cnt = 0;
for (int j = 0; j < n; j++)
if (a[i] % a[j] == 0) cnt++;
printf("%d\n", cnt - 1);
}
return 0;
}