Does Problem 231 Dice Black Jack work?

Back to General discussions forum

Vadim Pelyushenko     2025-06-27 03:52:20
User avatar

Whenever I click the run button and try to submit a solution, it seems to always say "You are to enter both answer and solution source code".

Rodion (admin)     2025-06-27 08:16:02
User avatar

Vadim, Hi!

Problem surely works but seemingly you experience strange situation with small pre-check which tries to ensure data are present on submission. I made small change, hopefully it will help (you may need to clear browser cache or perhaps simply relogin for this to apply).

for details, the behavior you see is here - and the message appears if answerNotNeeded variable isn't set and answer field is empty. This variable is not set in this task source but it is because answerHidden is set - and it should "secretly" set value 1 into answer field. somewhat silly logic which is going to be slightly updated. Hence if it won't work anyway you can as workaround open browser console and type in answerNotNeeded=true<enter>.

Sorry for this inconvenience and thanks for bringing it up!

Vadim Pelyushenko     2025-06-27 20:26:42
User avatar

It works for me now, thanks Rodion :)

Sadly my very complicated solution seems to time out even though it takes < 100k steps per call. I'm guessing that the 3 million step limit applies over all 49 games? Or maybe having 13-14KB of data in a bunch of strings ends up causing some other timeout check to trip.

And anyways it looks like more optimal play gets drowned out by noise, a very simple strategy for the game got me 48/49 wins, and a strategy that is known to be better did worse (like 44/49 wins). I'm assuming though you wouldn't consider it valid to try to game the RNG (e.g. by adding some randomness to my strategy and trying out different RNG seeds until I get a result I like). Actually I don't even know if for this problem using big lookup tables is considered valid either :P

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