Hi-Lo Dice Game

Back to General discussions forum

CSFPython     2024-03-27 16:51:09

Rodion,

I just happened to notice the appearance of the new problem. It may still be in the process of development.

I found the examples, together with the problem description, somewhat confusing. In the first example Sandor wins 5 of the 10 games and does indeed win 5 Forints as given in the answer. However, Juliska also wins 5 Forints from the other 5 games. The net win by Sandor is 0. In the second example, Sandor wins 2 of the 3 games gaining the stated 2 Forints. But Juliska wins 1 game and 1 Forint. Sandor thus has a net gain of 1 Forint.

I think that the amount that a player has won should be reduced by the amount that they have paid out to the other player. This would give answers of 0 and 1 for the example.

I tried submitting a solution based on the interpretation consistent with the example and found that some of my answers agreed with those that were expected and others didn't.

It seems a fairly simple problem. Maybe there is something that I have missed.

zelevin     2024-03-27 17:03:51

There are a couple of issues with the problem at the moment.

The first one is what Clive describes above: the bettor does not seem to lose their stake. For a two sided die, the total expected value really should be zero.

The second issue is that the checker does not seem to compute the correct answer for an odd-sided die. For example, for a nine-sided die it suggests that the expected value is 64/81, while it's really 56/81 (assuming the bettor does NOT lose their stake).

Rodion (admin)     2024-03-28 04:38:58
User avatar

Oh, sorry Friends!

Really it seems the problem input-output somewhat changed in my head while I was writing it. Let me put in improvements you suggested, shall be back here in some minutes.

UPD: fixed now, please kindly retry it. As for odd-sided cases, there supposedly was arithmetic mistake on my side additionally. I added 3-sided situation to example, hopefully I calculated right.

Please login and solve 5 problems to be able to post at forum