#include<stdio.h>
int main()
{
int t;
scanf("%d",&t);
while(t--)
{
int l,r,s;
scanf("%d%d%d",&l,&r,&s);
int min,max;
min=l/s;
if(min*s < l)
min++;
max=r/s;
if(min<=max)
printf("%d %d\n",min,max);
else
printf("-1 -1\n");
}
}
No comments:
Post a Comment