# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
3239 | BothEarRim | 쉬운 문제 (GA3_easy) | C++98 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <string>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <utility>
#include <locale>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <list>
#include <set>
#include <climits>
#include <cfloat>
#define PI acos(0.0) * 2.0
using namespace std;
int N;
vector<int> v;
int CountPair()
{
int res = 0;
for(int i=0; i<N-1; i++)
for(int j=i+1; j<N; j++)
if(v[j] % v[i] == 0) res++;
return res;
}
int main() // 쉬운 문제 (GA3_easy)
{
scanf("%d", &N);
v.resize(N);
for(int i=0; i<N; i++) scanf("%d", &v[i]);
printf("%d\n", CountPair());
return 0;
}