Von neuman loves binary doubt please help

can you please suggest me something related to it. i mean any hint, i m not able to take input. when i take input N then how to take input for the binary no. and if we are able to take input of the binary no. , how to convert that each binary into decimal. i know the procedure of multiplying the no. to the 2 to the power of 0,1,2,3… and then adding each but, im confused in how to get this for the particular inpur . how we will be able to identify the input. or for which input we are taking the output.


refer to this code for taking input…here t is the number of test cases…it is given in the ques that the the length of the binary number is less than or equal to 16…so store these numbers in long

HINT:when we are provide a number which is integer or long it is easy to access the digits from back…for ex)n=123…then n%10=3…n%100=2…n%1000=1…so try accessing the digits of number from back…take a sum variable and store your result in sum after each iteration…

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.