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.
You have to return o if the score is <0
Because there is no variable called "secret" accessible to your function. You also shouldn't be referencing the secret in your solution at all, you are supposed to generate the secret from the
triplets
input.You are supposed to return the secret, you aren't really supposed to know what the secret is before you've solved it. The kata lets you know the first one right away so you can work out how to get that string from the input, so you can then apply that same method to the other tests.
secret = secret
??you need to refactor your code.
something other than secret..
Read the standard troubleshooting documentation on the Codewars website, specifically this section:
My solution works on my machine, but not on Codewars
edit by the way I think it's unlikely that your code "works perfectly" on Visual Studio - are you telling me that:
chr(ord(i) + 13)
works for, e.g., inputs of
t
that occurs in the stringtest
?The value on the left -
7210
- is what your code is returning. The expected value is on the right -2071
.Without seeing your solution, I'm guessing you are trying to return the largest possible value, which would indeed be
7210
, when the kata is specifically asking you to return the next bigger number that can be formed, which from2017
is in fact2071
.This comment is hidden because it contains spoiler information about the solution
Hi. Please use markdown format tags to format your code or it's very discomfortable to read. See: https://docs.codewars.com/references/markdown/#code-block
I recommend you to read this help page to overcome your problem: https://docs.codewars.com/training/troubleshooting/
akar-0 sometimes, you can see their code with
View Solution
under their posts. That's what I did here.This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
How do you want anyone to answer you, we have no crystal ball to guess what you're actually talking about, we have no idea what your code looks like, we don't even no the language you're using...
All day users complain about wrong tests, wrong site, wrong kata, etc. And in the immense majority of cases they are wrong, their code is bad or they don't respect the instructions. About 15000 people solved this kata and nobody reported a true issue. What's more likely bad, your code or the site?
A minor change in a code can produce major changes in outputs. Now if you want to do something useful, provide a clear example of the code you used and you suppose is good (with a spoiler flag and properly formated), a test case and its log, and if really ever something was broken, someone may be able to check it out and fix it, or more probably, someone will explain why your code is failing.
Your code fails a sample test, it's easy to figure out why seeing it.
Also, this may help: https://docs.codewars.com/training/troubleshooting/.
Loading more items...