Source Code
#include <stdio.h>
#include <math.h>

int main(){
    long long x;
    int y,T;
    scanf("%d",&T);
    for(int i=0;i<T;i++){
        scanf("%lld %d",&x,&y);
        if(x>=y){
            long long k=ceil(x*1.0/y);
            printf("%lld\n",k*y);
            continue;
            }
        else{
            printf("%d\n",y);
            continue;
        }
    }
}
Copy
AZOZ with an O (EZ Version) LazyyTurtle
GNU G++17
29 ms
1.7 MB
Accepted