When the CEO gives you a hack
Hey!
Do you know a better way to shorten your code than by using lambda functions? I have more than the double caracteres than the first one in python 3, and I do not see any other way to improve what I have (exepted the solution which consist to find a better algo, but I do not have not found it yet).
To a better understanding of my issue, my lambda function is currently necessary to me as I am doing something twice.
Thanks.
Then, I think another way of improvment is that we can shorten the initial line by doing something else than āinput().slice()ā but I do not have any hint to do so yet.
Hi Yandross, in my solution I only read the input, do the while loop, do a print and increment a value. No need to use a lambda function nor to rename a function.
Thanks. Actually, I should review my algo. Without my lambda function, I only have one character less since Iām doing identical things twice. I do not see how you can increment only one value thougth. There are two axes, and I do not know how to update data about these two axes easily.
Anyhow, I will pass to something else for now.
Iāve exploited the fact that the tests are incomplete to increment only one value: unless LX == TX initially, you always need to move horizontally.
Ok, I though it would be something like that to reach the top. Iāll let my solution as it is so, thanks.
I fully agree. I donāt see the point. I use C++ and I prefer to focus on the clarity of the code rather than on its length. Even for javascript users I believe some automated tools exist to reduce/compress the source code as much as possible. Really, I donāt see the point even if I understand the challenge when we try to optimize gas in the Mars Lander challenge.
At the end using single letter variables remind me programming my calculatorā¦ It was a long long time ago in a galaxy far far awayā¦
Best regards, Philippe
I have the same problem. Does the report show the results of the current submission or of the previous best? If itās the previous best I cannot track errors. If itās the current submission my code has passed all the test yey my score hasnāt been updated.
Atm, itās the best one.
So is there any way to check which test case failed? My code passes all the pre-submission tests
The validators and the test-cases are the same.
We will add a char counter ASAP
I think itās a very good puzzle! It may not be useful on real life to write code this compact, but the exercise of exploring the syntax is perfect for learning a new language and thinking different algorithms combined with syntax changes is very challenging! Thatās why there arenāt many people with the same score, because this is a great exercise!
The char counter does not count the same number than the report. @SaiksyApo
@nicolas_patrois I bet youāre working on Windows.
No, Debian. Debian GNU/Windows does not exist.
Ok, so itās a different bug, because I tried Windows and Ubuntu and it worked as expected
Can you explain what happenned ?
Maybe tabulations are counted as one or as four?
Iāll try it again later.
A tab count or should be count as 4.
My code has 446 chars in the editor and 713 in the validator. Moreover, I replaced all tabulations by spaces. 8-|
why the source code size? why not the execution speed, or compiled code size, or byte-code size?