My issue
it is giving runtime error again and again ?
My code
t=int(input())
for i in range(t):
N, K=map(int,input().split())
remainder = N % K
if K != 0:
remainder = N % K
if remainder > K//2:
print(K - remainder)
else:
print(remainder)
else:
print(0)
Problem Link: CodeChef: Practical coding for everyone