https://www.codingame.com/training/easy/hello-world

Send your feedback or ask for help here!

Created by @TBali,validated by @bbb000bbbyyy,@PatrickMcGinnisII and @Deltaspace.

If you have any issues, feel free to ping them.

https://www.codingame.com/training/easy/hello-world

Send your feedback or ask for help here!

Created by @TBali,validated by @bbb000bbbyyy,@PatrickMcGinnisII and @Deltaspace.

If you have any issues, feel free to ping them.

My code passes exactly half of the cases.

It doesnāt pass, for instance, test # 2:

Found: Haile to thee, Noble Master!

Expected: Chairete! Haile to thee, Noble Master!

My program counts the distance between locations using Haversine formula, and it indicates that the smallest distance is 2607 km to The_Globe_Theatre. While āChariete!ā can only be heard from Epidaurus, which is 9305 km from my location.

Even if Iām using a wrong formula, the discrepancy canāt be that big. What am I doing wrong?

Based on the expected output you mentioned, I assume we are talking about Test case #02, travel location #3, which is: N450915 E0125549. That is near Venice, halfway between London and Epidauros, Greece. See it on for example Google Maps:

https://www.google.hu/maps/place/45Ā°09'15.0"N+12Ā°55'49.0"E/@45.1559524,11.809514,8z/data=!4m5!3m4!1s0x0:0x0!8m2!3d45.1541667!4d12.9302778

PS: beware, based on reviewer feedback, I just changed the order of input of the puzzle, so you shall update your input parser code.

Sorry, somehow after your update all my code got deleted, so I probably wonāt come back to this puzzle in the nearest future

If you ever submitted, you can get it back going to āresultsā menu on the left, then to āhistoryā and āsend to ideā. Sorry for the inconvenience.

My code passes all the cases except the second oneā¦

I found āChairete!ā instead of āChairete! Haile to thee, Noble Master!ā

I used the wikipedia page given in the exercise and all the other cases seem right thatās why I donāt understand why it doesnāt seem good for test #2.

If someone can help me, it would be great !

Thanks in advance !

I assume it is the 4th location of IDE TEST #2, that is N450915 E0125549. Distance to both Epidauros Theater and London Globe Theater shall be 1191 km. I suggest try to print out to error log the distance values that your code calculates and see where is the difference.

Check your distances to the capitals, you certainly have two capitals that should be considered at equal distance but that you do not properly detect (due to rounding error or floating point inaccuracy).

Unfortunately, itās a problem that is likely to happen as there are several possible formulas to compute the distance, which might lead to slightly different results. Anyway make sure (if appropriate to your programming language) to use 64-bit floating-point numbers (`double`

instead of `float`

in C/C++) to reduce that risk.

Hi,

To be honest, as the puzzle creator, I am a bit sad, that my puzzle received not too favourable average rating, with quite a big variance between 5s and 2s. As this was my very first puzzle candidate, I kindly ask for any feedback, what shall I do differently next time?

Did you find the puzzle too easy? Or too hard? Should it have been Medium instead of Easy?

Would you have needed more exact distance calculation formula in the description, instead of a wikipedia link and the need to figure it out yourself: sexagesimal DMS to decimal conversion, converting cardinal directions as the sign of the value, degree to radian conversion, which distance formula to use (with 64 bit float: any), rounding, etc.? (I thought if I write it all down, it is no longer a puzzle, maybe I was wrong.)

Were the test cases sufficient? Funny enough?

A few remarks:

- There are only 16 ratings for now (7 are <=2 stars).
- The āround and treat all values equal to the minā part could be trickier than you imagined (see my previous post in this thread), it can be frustrating to beginners who either do not know how to handle the boring floating-point issues or even are not aware of these issues. It seems to me that some easy (and maybe sometimes medium) puzzles have received bad ratings because of such issues.

+ I also checked very quickly and apparently you cannot solve this problem using the formula from Defibrillators. - Your puzzle did not benefit from a serious reviewing which could have spotted a few annoying points such as the previous one.

Well if you can take it, hereās what I commented on my own solution (thatās where I usually leave my hot takes, to remember them later on):

This puzzle has just about all it takes to tear the fun out.

Tedious input, useless input, numerical stability unawareness, voluntary hunting for rounding limits, unnatural output.

And quasiduplicate with an official puzzle, no less.

Not that I gave you a bad rating. I donāt remember what rating I gave, I just closed the page.

For me, this was such a nice puzzle - I have to learn few things on my own, which is fine. What I donāt like is validation on submitting result. I pass all test cases but didnāt pass Validator 6 on submit. And to be honest - looking for a bug in such mathematical code without any hint is nothing I would like to do. So I left this puzzle.

@Niako, @JBM, @Mejla: Thanks for the feedback. (And yes, I can take it )

The main takeaway for me is, that as a puzzle creator I need to focus much more on the ācustomer experienceā.

If it is not too much to ask, I kindly ask to review and comment also my other puzzle (currently on the ācontributions to be reviewedā page) - maybe with the help of you it will be better in the end than this one.

I just finished it and there is too me few points missing making the debug a more complex. For example, I was having problem with puzzle 2 and 6. I realized that this is the only ones having a mix of N/S or E/W.

My first bet :

- I was using the wrong way of making conversion (to decimal but also for the +/-). I had to checked on several online converter to ensure itās fine.

Second bet:

- I was using the wrong formula for the distance (because the formula is not given)ā¦ still no error.

Third bet:

- Rounding issueā¦ but no

At the end it was because I didnāt realized that the angle for E/W had 3 digits and 2 for N/S (you mentionned it but I missed it). As a result, in the first debug, I checked E0162100 as 01Ā° 62ā 100" and it was according my converter but instead it was 016Ā° 21ā 00"

Maybe having the formula given and a step by step example would help a lot

Thanks for the feedback. Yes, 3 or 2 digits of longitude degree can make quite a difference.

I updated the puzzle description with some more specific hints on formula usage, coordinate conversions, 64-bit floats.