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.
Oh God, this is what I wanted to do, but couldn't work my way towards a solution.
Great job :)
Yeah it took me a while to understand the .format() method. Basically the "%.2f" says to place it to two decimals (0.00) and the ", sum" mean insert the variable sum in that format. Hope that helps anyone who is curious since Wiseguy03's question was from 2 years ago lol
The test cases changed. This doesn't work anymore, as it returns the wrong outcome for int n =0 .
It's really cool!!!
This comment is hidden because it contains spoiler information about the solution
Interesting way of reversing, i don't agree that it wastes cpu, i understand that you are creating an extra set of bytes with the result string but in this case i don't think it is very expensive.
mind locale
so clever dude...
also: don't forget to always use the spoiler tag when discussing code. (I have added the tag for you)
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This is definitely not a good practice. Whenever you see a literal true or false you should always ask yourself if you can get rid of it by analyzing the boolean expression. Most of the time you only need to return the result of the boolean expression, as in this case.
you should use the type of StringBuffer , which can reduce the creatation of String variable in the StringPool.
How comes it accepted your code. I tried same logic. It passed the test and was denied by attempt.
This comment is hidden because it contains spoiler information about the solution
Loading more items...