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.
Thank you !!
Your calculation for IP address is wrong. Note there are 256 IP addresses from 10.0.0.0 to 10.0.0.255, and 256 also from 10.0.1.0 to 10.0.1.255, now try to compute that for each subset.
This comment is hidden because it contains spoiler information about the solution
Thanks a lot!!
https://stackoverflow.com/questions/134934/display-number-with-leading-zeros
I found the solution thank you
i mean, have you tried it on your computer ? check out the sample tests, there is a call
zeros(1000000000)
. run that on your computer and see how that goes...It works . I passed all the tests but it doesnt allow me to submit. Probably i shouldn't have used the factorial but i imported the sys to expand the limit. I don't mean to waste your time. Thank you
the description tells you exactly why your current approach will not work.
not very helpful but thank you
please make sure to read the description carefully before raising issues...
This comment is hidden because it contains spoiler information about the solution
But that's exactly it ;-)
%[]
only matches a non-empty sequence of characters. As soon as the match fails,sscanf()
returns, without parsing the integer.you are iterating on an list with a foreach loop while modifying it at the same time, this is very rarely a good thing to do, as it results in code that is hard to understand and a high probability of bugs. in some scenarios, you effectively delete some elements before they have been looped on, e.g. consider:
["two2", "one1"]
--> after the first iteration of your loop, this will be converted to["two2", "two2"]
."one1"
never gets iterated on.This comment is hidden because it contains spoiler information about the solution
Loading more items...