Add optimal solution for countnondivisible
Added some comments