提交时间:2022-08-08 11:38:05
运行 ID: 54967
#include<bits/stdc++.h> using namespace std; int T,n,ans; int mp[2385609]; int main(){ // freopen("pair.in","r",stdin); // freopen("pair.out","w",stdout); scanf("%d",&T); while(T--){ memset(mp,0,sizeof(mp));ans=0; scanf("%d",&n); for(int a(1);a<=n;++a) for(int b(1);b<=n-a;++b) if((a*b)%(a+b)==0&&!mp[a+b]){++ans;mp[a+b]=1;} printf("%d\n",ans); } return 0; }