user will give an input and that input is a string and the string is actually a binary code and the length of that string could be in the range of 0 to 30k and then i have to check that after converting binary to decimal is the number is devisible by 5 or not
now what i done simply
my algo
convert the string to an decimal integer and for that i am using the method Integer.parse(s); which was giving me the number format exception error and then i put it into a try and catch block but in the catch block i still have to check that binary is string is divisible by 5 or not so now what should i do ??
@dburyak @shubhamsomu @AniVerma17
U just want to check if the input binary number is divisible by 5?
@Bittle
Do you realise that a 30K long binary string will be so big that it cannot be represented by an Integer?
Обсуждают сегодня