[Community Puzzle] Road Trip

Hm, does anyone have debugging suggestions for validator 4, it seems to be testing a scenario not covered by the test cases.
Thanks in advance.

I checked the puzzle ā€¦

Test and validator 4 (Necessary fake friends) are similar with same number of friendsā€¦

Thanks for replying. I guess what makes a difference is the distribution of the friends, not their number.

Anyone else stuck on the last test (too many friends)? My solution returns ā€œ11505825ā€ while the correct solution is ā€œ12211143ā€. Iā€™m passing all the other tests and canā€™t break through the last one. Unfortunately, I cannot properly debug it, because if I add print() statements, it times out.

i donā€™t understand some cases in this puzzle.
For instance the ā€œMANY REAL FRIENDā€
SOlution is 21515517, so i assume you should leave with 422 friends, for a cost per person of 1087.9 (rounded)

what about leaving with 423 friends, for a total hapiness of 21527121, and a cost per person of 1086.9

or leaving with 498 friends, for a cost per person of 975.6 and a hapiness of 25259954 (better than solution)

am I totally missing something ?

If you want to leave with 423 friends you canā€™t cause thereā€™s only 422 of them who could afford it.
If you want to leave with 498 friends you canā€™t cause thereā€™s only 450 of them who could afford it.

2 Likes

my code is working as well in your testcase, but idk original testcase is wrong -_-

Hi, all my tests cases are working, and all validator are working except first one, I have no clue. Any idea ?

You may PM me your code to let me have a look.