Adapted by Neilor Tonin, URI Brazil
Paulinho have in your hands a little problem. The teacher asked him to make a program to verify from two integer numbers A and B, if B corresponds to the last digit of A.
The input consists of several test cases. The first line of input contains an integer N that indicates the number of test cases. Each test case consists of two integers A (1 ≤ A < 231 ) e B (1 ≤ B < 231) positives.
For each test case, print a message informing if the second number fit ("encaixa" in portuguese) or didn't fit ("nao encaixa") in the first number.
Sample Input | Sample Output |
4 |
encaixa |