Accepted
Code
#include<bits/stdc++.h>
using namespace std;
#define endl "\n"
#define trace(x) cout << #x << ": " << x << endl
int32_t main()
{
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
int n; cin >> n;
int a[n];
for(int i = 0; i < n; i++)
{
cin >> a[i];
}
int cnt = 0;
for(int i = 0; i < n; i++)
{
for(int j = i + 1; j < n; j++)
{
if((a[i] * a[j]) % (a[i] + a[j]) == 0) cnt++;
}
}
cout << cnt << endl;
return 0;
}
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:05:47
- Judged At
- 2024-12-07 10:05:47
- Judged By
- Score
- 100
- Total Time
- 1ms
- Peak Memory
- 608.0 KiB