You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
625 B
C++

#define _CRT_SECURE_NO_WARNINGS
#define _SILENCE_CXX17_C_HEADER_DEPRECATION_WARNING
#include <bits/stdc++.h>
using namespace std;
int main()
{
int T;
scanf("%d", &T);
while (T--)
{
long long a, b, x, cnt = 0;
scanf("%lld%lld%lld", &x, &a, &b);
for (long long i = 1; i <= a; i++)
for (long long j = 1; j <= b; j++)
if (x / i * j == x * j / i)
{
printf("dbg: %lld %lld %lld %lld\n", x, i, j, x / i * j);
cnt++;
}
printf("%lld\n", cnt);
}
return 0;
}