guys the problem is simple take t no of cases and taking two elements a and b and find the reminder , i did two ways nothing is working

T = int(input())

if T < 1000:

for i in range(T):

ans = 0

a,b = map(float,input().split(" "))

if a < 10000 and b < 10000:

ans = a % b

print(ans)

what is the mistake , i am not able to understand