题目描述
It can be seen that the number, 125874, and its double, 251748, contain exactly the same digits, but in a different order.
WAP to check that if 2 such numbers have this property
Input:
The first line will consist of the total number of test cases T(1 ≤ T ≤ 10).
The next T lines will consist of one number on each line. This is the number N(1 ≤ N ≤ 100000000).
Output:
For each test case, output a single line which returns 1 if the 2 numbers satisfy the above said conditions and 0 otherwise
Example:
Input:
5
23
45
123
123
1234
123
1223
1222
1223
1234
Output:
0
1
0
0
0
输入格式
见题面
输出格式
见题面
样例输入
5
23
45
123
123
1234
123
1223
1222
1223
1234
样例输出
0
1
0
0
0