Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
The solution is correct, but I expect this one to be a tad slower, since it evaluates three times. the third one is completely unnecessary since it doesn't chenge the value of the total but still causes assignment, which also has a cost.
If you were going for read ability, I can see that this is easy to compare against the requirements, but I would make a couple of changes...
One line - okay - but good luck giving that to a new engineer, or comparing it to the requirements in a code review, or for that matter remembering what you did three weeks from now. LOL