scala number place solver