|All-time Popular Problems|
|Maximum difference between node and its ancestor|
|Count nodes of linked list|
|Find first set bit|
|Angle between hour and minute hand|
|Recursively remove all adjacent duplicates|
|Remove every k'th node|
|Merge Two Sorted Arrays|
|Spirally traversing a matrix|
|Merge two sorted linked lists|
|Longest Increasing Subsequence|
Given two positive numbers x and y, check if y is a power of x or not.
First line contains an integer, the number of test cases 'T'. Each test case should contain two positive numbers x and y.
Print 1 if y is a power of x, else print 0.
Explanation: 8 is a power of 2, but 3 is not a power of 1.