Finding cb numbers


does not passing 2 test cases from 7 test cases plzz help in this

Can anyone help. Me in this