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.
I added two examples of large values to the sample and fixed tests in all the translations.
Will do when I get a chance, probably Tuesday.
The condition "c to be less than int max" is really redundant, since all variables are ints.
I did add the following text to the description, which hopefully will clarify things:
Note: Although a, b, c are all integers, it's possible that their squares can exceed the integer bound in a statically-typed language. Such solutions should be included.
Hi eurydice5717,
I believe I have fixed the issue. Please try again and let me know.
Regards,
brodiemark
can't verify due to not having solved in c++/not seeing your code
but - this looks to me like you're mixing up different test cases, ie. you're showing the input of one test and the expected output of a different one. be careful with how you print and how you read the output.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
duplicate of this suggestion
Does that edge case (n=1, k=10) still exist? Right now, the description says (0 ≤ k ≤ n^2).
in your quote you left out the key part:
It is perfectly conceivable that the left end of the rubber band is tied to something so that the rubber band is only stretched rightwards. Feel free to propose concrete suggestions to improve the wording
Yes you are right that you normally wouldn't change the input vector. I wanted to keep it as simple as possible with this one, that's why I didn't make it constant. But I will change it :)
Whatever you want.
btw I didn't fix the part where it conditionally runs a test
and this condition is also weird looking:
because conceivably that could be satisfied 0 times and make no changes and still change the expected value to False. but maybe the data ensures that logic does happen. it's also shuffling multiple times even though once has the same effect, which adds to the feeling that .. something is off.
Anyway I get that this is probably straight from cpp, including the giant if/else thing. Do whatever you want even if it's nothing. For my part I just need to fulfill my urge to point it out.
Tried this, but it doesn't seem to have had any effect.
Your refactoring looks good to me. Would you like me to incorporate it into my version, or do you want to publish a new Python translation?
You can probably edit it and unpublish it yourself.
This part doesn't look right to me:
running a test here is.. conditional? so sometimes it won't be 2000 tests even though 2000 iterations are made? but I ran it a few times and didn't have it happen so.. does it happen very rarely, is it a bug, can it be rewritten to ensure it carries out a test?
I thought the nested control structures were a bit much and started refactoring.. which is why I thought the above thing is weird.
Also noticed that when a solution is wrong the solution gets called AGAIN instead of looking at the value that was returned:
This is what I have in my editor atm:
I know. I don't translate for just anybody. :-)
By the way, there is a pending Python translation from me in the translation window which should be rejected. I think it's a result of my fork yesterday when I got mysterious failure messages. Today I just edited the current approved translation and re-published it. That's the one that should be used, correct? The one that aborts the batch.
Loading more items...