Accepted
Code
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define bug(x) cout<<#x<<" : "<<x<<endl;
#define bug2(a,b) cout<<#a<<" : "<<a<<"\t"<<#b<<" : "<<b<<endl;
signed main(){
ll t=1;
while(t--){
ll n;cin>>n;
vector<ll>v(n);
for(int i=0;i<n;i++)cin>>v[i];
ll ans=0;
// bug(ans)
for(int i=0;i<n;i++){
for(int j=i+1;j<n;j++){
if((v[i]*v[j])%(v[i]+v[j])==0){
// cout<<i<<' '<<j<<endl;
ans++;
}
}
}
cout<<ans<<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:07:23
- Judged At
- 2024-12-07 10:07:23
- Judged By
- Score
- 100
- Total Time
- 2ms
- Peak Memory
- 772.0 KiB