Ericsson Interview Question

b number analysis to solve