Accepted
Code
#include <bits/stdc++.h>
#define ll long long
#define F first
#define S second
#define endl '\n'
#define Endl '\n'
using namespace std;
const int N = 2e5 + 5;
int tc, n, m, a[N];
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0); // cout.tie(0);
cin >> n;
int Ans = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
for (int j = 0; j < i; j++) {
ll product = 1ll * a[i] * a[j];
ll sum = a[i] + a[j];
if (product % sum == 0) {
Ans++;
}
}
}
cout << Ans << endl;
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1131 Count Special Pairs
- Contest
- Lockout contest round-1 ( Mazharul Islam vs Thakur Emon)
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2024-11-04 17:08:02
- Judged At
- 2024-11-11 02:33:45
- Judged By
- Score
- 100
- Total Time
- 1ms
- Peak Memory
- 532.0 KiB