by AskAI

Check these solutions from our community and artificial intelligence:

This solution is correct and demonstrates a level of completeness. The candidate has used the sum() function, which is an optimal solution. The candidate has also used a one-liner, which is also optimal.