So, I was doing some coding stuff and run in some problems, so let's take this 6x6 grid. How can I make 26 into 2 . I want to take any number in any row and turn into first row equivalent number. It should work on any grid. I can solve this problem with while loop, but I do think there is some easy math solution to this.
0 1 2 3 4 5
6 7 8 9 10 11
12 13 14 15 16 17
18 19 20 21 22 23
24 25 26 27 28 29
30 31 32 33 34 35
0 1 2 3 4 5
6 7 8 9 10 11
12 13 14 15 16 17
18 19 20 21 22 23
24 25 26 27 28 29
30 31 32 33 34 35
Last edited: