Source Code
#include <stdio.h>
#include <math.h>
int main(void) {

int n;
scanf("%d",&n);
for(int i=0;i<n;i++)
{
	 int x,y;
	  scanf("%d%d",&x,&y);
	  for( int j=x;j<pow(10,9);j++)
	  {
	  	if(j%y==0) {
	printf("%d\n",j); break;
	}}

}
	return 0;
}
Copy
AZOZ with an O (EZ Version) Lyn almousa
GNU GCC C11
2053 ms
1.2 MB
Time Limit Exceeded