#include<stdio.h>
int g(int x) {
int i;
int count = 0;
for(i = 1;i<=x;++i)
if(x%i==0)
count++;
return count;
}
int main( )
{
int n,a,b,i;
scanf("%d",&n);
while(n--)
{
scanf("%d%d",&a,&b);
int res = a;
for(i = a;i<=b;++i)
{
if(g(i)>g(res))
res = i;
}
printf("%d\n",res);
}
return 0;
}
HDU - 2521
最新推荐文章于 2019-03-10 18:29:03 发布