Accepted
Code
#include<bits/stdc++.h>
using namespace std;
#define int long long
void solve() {
int n; cin >> n;
vector<int> a(n);
for (auto &x : a) cin >> x;
int ans = 0;
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
int mul = a[i] * a[j];
int div = a[i] + a[j];
cerr << mul << ' ' << div << '\n';
ans += ((mul % div) == 0);
}
}
cout << ans;
}
signed main() {
// int tt; cin >> tt;
// while (tt--)
solve();
}
Information
- Submit By
- Type
- Submission
- Problem
- P1131 Count Special Pairs
- Contest
- LU IUJPC : Sylhet Division 2024, Mock Round
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2024-12-07 10:09:47
- Judged At
- 2024-12-07 10:09:47
- Judged By
- Score
- 100
- Total Time
- 2ms
- Peak Memory
- 540.0 KiB