completed alphacodes problem from careercup