题目链接:
LightOJ 1236 Pairs Forming LCM
题意:
long long pairsFormLCM( int n ) {long long res = 0;for( int i = 1; i <= n; i++ )for( int j = i; j <= n; j++ )if( lcm(i, j) == n ) res++; // lcm means least common multiplereturn res;
}
题目链接:
LightOJ 1236 Pairs Forming LCM
题意:
long long pairsFormLCM( int n ) {long long res = 0;for( int i = 1; i <= n; i++ )for( int j = i; j <= n; j++ )if( lcm(i, j) == n ) res++; // lcm means least common multiplereturn res;
}