|All-time Popular Problems|
|Check if subtree|
|Delete Middle of Linked List|
|Given a linked list of 0s, 1s and 2s, sort it.|
|Count nodes of linked list|
|Delete N nodes after M nodes of a linked list|
|Check for Balanced Tree|
|Remove every k'th node|
|k largest elements|
|0 - 1 Knapsack Problem|
|Subarray with given sum|
You are given two numbers N1 and N2. You need to find out if the product of these numbers generate an even number or an odd number.
The first line of the input contains a single integer T, denoting the number of test cases. Then T test cases follow. Each test case contains two lines of input:-
The first line contains N1
The second line contains N2
For each test case, Print 1 or 0 according to the result. if even print 1 else print 0.
For test case 1: N1 is 5, N2 is 8; 5*8=40 is even, so we print 1.