Source Code
while True:
    t = int(input())
    if t >=1 and t<=10**5:
        break
lst = []
for i in range(t):
    while True:
        l = (input())
        l = l.split(" ")
        x = int(l[0])
        y = int(l[1])
        if (x>=1 and  x<=10**9):
            if (y>=1 and  y<=10**9):
                break
    if y >= x:
        lst.append(y)
        continue
    else:
        k = x 
        while True:
            if k % y == 0:
                lst.append(k)
                break
            k+=1

for i in lst:
    print (i)
Copy
AZOZ with an O (EZ Version) massoud01
Python 3
2075 ms
3.3 MB
Time Limit Exceeded