Question: Need help with programming assignment Python Please and Thank you! If you are writing the file in Python: studentsolver.py should have a function with the
Need help with programming assignment
Python Please and Thank you!
If you are writing the file in Python: studentsolver.py should have a function with the header def solve(x,n):
You have been recruited to play in the Squid Game. All n players are numbered in sequential order with a positive integer starting with 1. Players numbers are sewn onto the front of their shirts. The game is as follows. Players play the game in order: First, player 1, then player 2, then player 3, and so on. There are x lines that a player can choose to stand in. When it is a players turn, he/she picks a line to stand in. If a player chooses to stand in a line, he/she must walk to the back of that line and remain standing in place there until the end of the game. Rule: When a player chooses to stand in a line, the sum of his/her number and the number of the person that he/she is standing in back of must add up to a perfect square. (This rule does not apply to the first player in line because he/she is not standing in back of anyone.) Rule: All lines must be populated by at least one person at the end or everyone gets shot. If it is a players turn and he/she cannot choose a line while respecting the Rule, then that player and all players not in a line already are shot. You will solve the following problem: Given a value for x and n, count the number of configurations that will save every person. Two configurations are considered the same if one configuration is a line rearrangement of the other.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
