Help me in solving STICKBREAK problem

My issue

My code

# cook your dish here
for i in range(int(input())):
    l,k=map(int,input().split())
    print(l-k)

Problem Link: STICKBREAK Problem - CodeChef

When you consider a range of l and k values you will observe that for every l,k pair (if l is not equal to k and if l is not a multiple of k) there will always be a possiblity suck that the |Ai+1 - Ai| is always equal to one.
ex:
[l, k] - [A0,A1,A2,…] - final output
[3,3] - [1,1,1] - 0
[4,3] - [2,1,1] - 1
[5,3] - [2,2,1] -1
[6,3] - [2,2,2] - 0
[7,3] - [2,2,3] - 1
[8,3] - [3,3,2] - 1
[9,3] - [3,3,3] - 0

so the code can be written as follows

`

for i in range(int(input())):
 l,k=map(int,input().split())
 if(l%k==0) or (l==k):
    print(0)
else:
    print(1)`