Bulgarian Solitare Bug

After submit I found out, that definitly incorrect solution passes tests for 100%. But it does not pass all tests in IDE. I think you can get wrong answer in my solutions and fix tests

If you’ve got a reproducible test case for that, I’ll gladly add it to the set.

Yes, i’ve got it.Should i publish it here?

Sure. Or PM me if you prefer.


import sys
import math

‘’’ some code’’’

so the answer is …

Noooooooooo I meant a test case, not solution code!

all cases!!!
it’s wrong, like broken watches, that shows right time twice a day!

AFAICT, all cases are correct.

Correct cases in this context means “they have an input/output pairing that matches the problem statement”.

Your initial message, reworded, claims “there exists code that can solve the validator IOs, but not all tests.” Such code, obviously, is incorrect. Correct for code means “solves the problem statement”.

We can help fix that by adding validators (and tests, for symmetry) that are correct as well, but make incorrect code from the previous paragraph fail. Would you be able to provide such cases? Or, at least, to describe how to build them?

ok. you have this tests in IDE. right solutioins…

Please, just provide me with a set of input that is accepted by your alleged faulty program, but doesn’t fit the problem statement. Anything else is speculation.

‘’‘one example’’’

I don’t really (well, read that as “directly”) care about your code :slight_smile:

Yes, in your case the answer is 1, that would be found by the code you provided. That only proves your code is correct in that case.

Do you have a test case to provide where your code would be incorrect?

[so people don’t get too lost, as we’ve taken this to chat]

Puzzle validators are verified weaker than standard. It’s late for both reporter and myself, but they’ll provide additional cases that fail their code soon, and I’ll edit the puzzle.

1 Like