Interview Question

Правка en1, от gXa, 2018-12-03 20:14:50

There are 3 integers a, b, w.

There are 2 equations –

w+a=b

a (bitwise AND) b =0;

I was given the value of w and he asked me to calculate the number of pairs (a, b) satisfying the two equations.

Теги bitmasking

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский gXa 2018-12-03 20:15:08 1 Tiny change: 'e AND) b =0;\n\nI wa' -> 'e AND) b = 0;\n\nI wa'
en1 Английский gXa 2018-12-03 20:14:50 227 Initial revision (published)