Doubt in understanding a problem

Hello, we are given with a constraint : N<=1000 Digits in binary representation is <=16.

Now, suppose we have N = 5. So we will have to input 5 binary numbers. Now my doubt is that do we have to check for each number if it contains digits<=16 ?
And if yes then if any number contains digits greater than 16 what will I have to do ? Whether should I proceed by skipping that number or should I stop executing the program at that number

hello @yashsharma4304 you dont need to actually see how many digits are there in the binary number because it is just the constraint .
you have to first apply your logic to convert binary number into decimal number .
you dont need to think about the number of digits in the binary number .
here for your reference i am attaching the code :


Happy Learning !!

1 Like

So do you mean that those constraints are only human constraints. Not the constraints top put inside the program.

yes there is no need to put that constraint in the code .
if you feel that your doubt is cleared please mark this doubt as cleared and do give the star ratings.
Happy Learning !!

1 Like

Is this code right?

@yashsharma4304 wait let me see the code :

@yashsharma4304 yes this code of yours is perfectly fine and passing every test case .

1 Like

Ok one more query. If I ask any doubt regarding understanding of problems then will it affect my score??

hey @yashsharma4304 no doubt if yours will affect your score .
you can ask and clear every doubt of yours without thinking about your scores .
Happy Learning !!

1 Like

Ok so it won’t affect my score?

@yashsharma4304 yes .

Ok thank you for your assist :smile: