poj2853
简单题
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <cstdio>
#include <cmath>
using namespace std;
int main()
{
//freopen("t.txt", "r", stdin);
int t;
scanf("%d", &t);
while (t--)
{
int a;
scanf("%d", &a);
printf("%d ", a);
int n;
scanf("%d", &n);
int m = floor(sqrt(n * 2));
int ans = 0;
for (int i = 1; i <= m; i++)
{
if (i % 2 == 0 && n % (i / 2) == 0 && n / (i / 2) % 2 == 1)
ans++;
if (i % 2 == 1 && n % i == 0)
ans++;
}
printf("%d\n", ans - 1);
}
return 0;
}