Codingbats one liner solution