Sequential Survival 👻

With the flooring designs out of the way, which will be implemented after Ramadan, today Mustafa finds the 2 youngsters, Sajid and Irfan, sprawled across the floor again before asr jamaat, and they are playing a silly game of 789.

Yesterday, as members of the community took their positions in the prayer hall, they assigned each position a random number.

The hall was completely filled (400x80).

The game is as follows:

Starting from position 1 in a row (if all positions are indexed from 0), if the sum of a position and the position before it is equal to 7, that person is a hungry person!

If the sum of the next position (its own value and the position before it) is equal to 9, that person is eaten because 7 ate 9!

For example, if a row consisted of 2546334884546, position 1 is number 2. The index position 0 is always ignored.

| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10| 11| 12|

|---|---|---|---|---|---|---|---|---|---|---|---|---|

| 2 | 5 | 4 | 6 | 3 | 3 | 4 | 8 | 8 | 4 | 5 | 4 | 6 |

the sum of position 1 would be 2+5.

the sum of position 2 would be 5+4.

In the above case, the first position would be a hungry person, and the next position (2) would be a 9. Position 2 would be eaten!

The 3rd position (6) would equal 4+6 and would not therefore equal 7.

Position 6 would be the next number that equals 7 (3+4), but position 7 does not equal 9. Position 9 lives!