Back to General discussions forum
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.
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).
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.