[Community Puzzle] A bit of accounting - Lettering - Puzzle discussion

Coding Games and Programming Challenges to Code Better

Send your feedback or ask for help here!

Created by @Soft55,validated by @LeMasSon,@Anonymiste59 and @Y4sn.
If you have any issues, feel free to ping them.

Good idea for an easy puzzle, but tests and validators could have been much bigger, with hundreds of lines. I think there could have been some tricky cases that have been forgotten here. Such a shame.

If you point out which tricky cases you’re thinking of, it might still be possible to edit the puzzle to add them?

As far as I understand (based on the current constraint and the author’s comment on the contribution page), the author’s original intention was to keep the puzzle an easy one. Please check with the author before making any changes. Also, we should avoid editing a puzzle after its approval as much as possible, unless the modifications are necessary (e.g. corrections).

I never changed a puzzle by myself if it is not mine ! I agree with 5DN1L about that.

I was able to discuss this subject with the author and he had the idea of redoing another puzzle with a much greater complexity and consequently a more extensive test set to cover the more twisted cases

2 identical puzzles with differents test cases ? :confused:

Hi,

Not sure to understan properly the objectif of the puzzle.

As far as I understood with “You will be giving a list of invoices and a list of payment entries on a bank statement. You must match each entry with one or more invoices.”

you have to match same invoices with same payment Entries.
The rest of the invoices which are not in entries are grouped in the Entry left

But in the 4th test case you have

  • A 10 - 10
  • B 24 - 10 14
  • C 12 - 12

Which totally invalidate how I understood the problem.

Do I have to get thes entries which summed up gives the Invoice value ?

NB : I tried with the sum thing that but validators 3 & 4 fails…

“Same” is not mentioned in the puzzle statement.

Imagine you have some invoices. Sometimes you pay only one invoice at a time. Sometimes you pay more than one invoice at a time (see Test 3 for example). The objective is to tell which invoices you are paying for with each payment.

1 Like

Not exactly the same, but on the same basis. In the same spirit as mars episode 1,2,3 or the fall. After all, I’m not the author of this puzzle:)

Hello, someone has extra test cases? 100% but failing validator 3,4; thanks

Validator 3 is similar to Test 3; only Line 3 and Line 5 are different. You may try some different numbers (they’re all relatively small numbers) to test your code.

For Validator 4: One of the payments is for three invoices. Please make sure your code is able to handle such a situation.

@Quinaz I also had problems with validator 3,4. Check out if invoices are sorted in given (input) order

you don’t need sort. if you sort test 3 fail.
test 4 fail because the invoice are by example10 12 14 10. and that you display 10 14 and not 14 10 because the first 10 is used before.

test 4 fail because the invoice are by example10 12 14 10. and that you display 10 14 and not 14 10 because the first 10 is used before.