Coding Games and Programming Challenges to Code Better
Send your feedback or ask for help here!
Created by @Lucasgood,validated by @Nagato_Uzumaki,@Edjy and @JorBer.
If you have any issues, feel free to ping them.
Coding Games and Programming Challenges to Code Better
Send your feedback or ask for help here!
Created by @Lucasgood,validated by @Nagato_Uzumaki,@Edjy and @JorBer.
If you have any issues, feel free to ping them.
This problem got a problem.
The example said 134 is the only correct acceptable speed as answer.
But there are many possible and equally correct answers:
134.09
134.10
134.1
ā¦
Not a word in the statement handles this ambiguity.
Yes, I tried rounding down and it passed all tests and validators.
Rounding to closest integer works fine too.
But yes it should have been specified.
āordered alphabetically by Plate first, then Speedā
I guessed each plate appears only one time at each radar (it is not said explicitely, and this quote made me hesitate).
I think āordered alphabetically by Plateā would be enough
Yes, that is my bad. When I validated the puzzle, because of the way it was worded, I thought there would be mulitple passings by the same license plate.
I think it should be changed, but maybe it canāt be changed to include the same plates now that people have already solved it? If so, the statement should be changed to only specify plates, and it should be specified in the statement that there is only unique plates.
In my opinion, option 2.
I think multiple passings by the same car induces useless difficulty. If the problem goes on this road (^^), then we could imagine some twisted paths, like entering two times the radar zone but exiting only once (the other, exit was taken at km 51, to āAĆ©roport de Valenciennesā).
I donāt know if I agree that the raised difficulty would be useless, but I can agree that it is not warranted for this puzzle. Nonetheless, the statement needs to get fixed
Hello guys,
I updated this contributions looking at your opinion and the contribution comment,
Removed the āordered alphabetically by Plateā
Added āAll speed value will be truncated to integer. ( 137.89 ā 137 )ā
Reworked the STUB generator
Why?
Itās not hard.
Hi Lucas,
Nice puzzle, thanks. Just a small thing, and I am late for that, but maybe for next puzzle you should add an example with two plates similar until the last number. Here, while sorting, i can stop to AA-8xx-xx and not bother about the āxā, it will work.
Fun puzzle anyway !
Continuing the discussion from [Community Puzzle] 1. NGR - Basic Radar:
Hi @Lucasgood : will my code be integrated in the next generation of Radar firmware ?
ā lol, thanks for this good puzzle !
Hey!
My code passed all the testcases, but unfortunately it didnāt pass Medium Density Validator and Validator 4. I cannot understand where my mistake is. Is there any chance to check what plates do we have at least for one of these validators?
Send me your code (and the language) in private, Iāll send back whatās wrong.
Hi, I think there is an error in the statement:
āAll speed value will be truncated to integer. ( 137.89 ā 137 )ā
Seeing this sentence I used Math.trunc() (in js: " The Math.trunc()
static method returns the integer part of a number by removing any fractional digits."), I passed all the tests but not the validator.
I tried after with Math.round() (āThe Math.round()
static method returns the value of a number rounded to the nearest integer.ā) and this time if I passed the validators
Otherwise good puzzle
That is odd. Iāve just checked a dozen of published Python solutions, and all use Math.trunc instead of Math.round. Maybe there are some offsetting issues in your code, which help you pass the validators with Math.round?
If you want, I can send you my code. I looked at several JavaScript solutions, and some of them use Math.round, while others use Math.floor or Math.trunc. However, I donāt think I used some weird speed formula.
Yes, you may PM me your code so I can have a look.
Finding: The order of calculation has an effect on the last validator:
That is unfortunate.