I write the code of total no of pair (a,b) whose and is ==0 (a&&b==0 please tell me where is mistake in my code )
hi @kailash_01 && is the logical AND which is used for boolean values. You are looking for bitwise AND which is represent by &
using bitwise and is also not getting all test case correct??
@kailash_01 i dont understand why are you separating the digits of the numbers? The question gives you an array of numbers, and you have to make pairs from it yourself, and report the number of pairs whose & gives 0.
@kailash_01 https://ide.codingblocks.com/s/223552 here is my code if you have any doubts. It passes 2/3 test cases only, but I think the sample output is incorrect as I saw the same question on a discussion thread on codeforces and there the sample output was 2.
@kailash_01 https://www.geeksforgeeks.org/number-ordered-pairs-ai-aj-0/ you can see an efficient solution here.