参考文献
C++ 代码
#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
int main()
{
int t ;
long long s ;
cin >> t ;
while (t -- )
{
s = 0 ;
long long n, m ;
cin >> n >> m ;
for (int i = 1; i <= n; i ++ ){
if((m % i == 0) && (m / i <= n)) s ++ ;
}
cout << s << endl ;
}
}