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 given types are both i16. If you want to support bigger numbers the signature of the function has to be changed accordingly. Changing the types in the function on the fly is confusing at best. Giving back an error result in the case of an overflow would be the best practice.
noice!
feels like cheating
noice
Beautiful
A testcase could be n = 4000, m = 4000, which will evaluate to -96 in i16
An excellent point. Though for the scope of the problem it would hardly matter.
You don't need the extra parentheses if you wanted a cleaner oneliner
if there's an
x
in the string, then the input is invalidgood, but if input string have a "x" char this solution doesnt worked.
best.
very clever and clean => best practice ๐
100% it is a best variant, geez, genius and minimalistic
I didn't even think of that. I used if
Approved some time ago
Loading more items...