79511423

Date: 2025-03-15 16:26:06
Score: 2
Natty:
Report link

I think you want temp_p_num = p_num inside the for p_num loop and the test temp_p_num == boxes[p_num] should be p_num == boxes[temp_p_num]. IOW The prisoner p_num opens a box with his number in it

Thanks to the comment from Martin Brown, that answered it and it works now as expected!

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: TJBHobbys