 0

# Ninja and Bombs

Difficulty: EASY

Problem Statement
Suggest Edit

#### You are given an integer ‘N’ denoting the x-coordinate of Ninja’s friend’s house. Can Ninja reach his friend’s house? If yes, then return 1 else, return 0. Can you help him find without using the modulus operator?

##### Input Format:
``````The first line contains ‘T’, denoting the number of test cases.

Each test case contains a single integer ‘N’, denoting the x-coordinate of Ninja’s friend’s house.
``````
##### Output Format:
``````For each test case, return '1' if Ninja can reach his friend’s house else return '0'.
``````
##### Note:
``````You cannot make use of the modulus operation.
You are not required to print the expected output; it has already been taken care of.
Just implement the function.
``````
##### Constraints:
``````1 <= T <= 10
1 <= N <= 10^9

Time Limit: 1 sec
``````
##### Sample Input 1 :
``````2
2
1
``````
##### Sample Output 1 :
``````1
0
``````
##### Explanation for Sample Input 1 :
``````In the first test case, the x-coordinate of his friend’s house is, even so, Ninja can reach so 1 is returned.
In the second test case, the x-coordinate of his friend’s house is, odd so, Ninja can reach so 0 is returned.
``````
##### Sample Input 2 :
``````2
7
2
``````
##### Sample Output 2 :
``````0
1
``````   Console