Computer Science, asked by sandeep4468, 3 months ago

Two divisors
You are given an integer N. Your task is to find how many numbers (denoted by X) exist for the given N such that 1<x< N and the number of
divisors of X is a power of 2.
Example
Consider N = 4,. You have to determine for the given N, X such that, 1<x< N and the number of divisors of X is a power of 2
Here the answer is 3.
• Number of divisors of 1–1 (can be represented as 20)
• Number of divisors of 2=2 (can be represented as 21)
• Number of divisors of 3=2 (can be represented as 21)
• Number of divisors of 4=3 (It cannot be represented as power of 2)
. Therefore, the total count of valid Xs (1<x<4) is 3.
Function description:
Complete the solve function provided in the editor. This function takes the following 2 parameters and returns for the given N, X such th
1<x< N and the number of divisors of X is a power of 2.
• Q. Represents an integer denoting number of elements
• arr: Represents an array denoting each N
Input format
Note: This is the input format that you must use to provide custom input (available above the Compile and Test button).​

Answers

Answered by rekaraju2005
0

Answer:

ayxfythchzbzbzuzz szhzhzbzbbxhxnxbhxdnhxmx

Similar questions