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<1000;j++)
	  {
	  	if(j%y==0) {
	printf("%d\n",j); break;
	}}

}
	return 0;
}
Copy
AZOZ with an O (EZ Version) Lyn almousa
GNU G++17
18 ms
480 KB
Wrong Answer