Given two positive integers num1 and num2, the task is to find the remainder when num1 is divided by num2.
First line of the input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case consists of a single line containing two positive integers seperated by a space .
Corresponding to each test case, print the remainder in a new line.