Yes, it seems I had same issues as you had. The takeaway is “do not calculate it in whatever Int/Bigint/etc your language uses by default” but instead “use 32-bit unsigned integers for all intermediary variables and constants”. That seems to be the only way to do it, anyway.
A similar takeaway seems to be do not use languages that use Floats/Doubles/etc for computation on integers. I am pointing onto the gentleman above who used TypeScript.
Yes I found it
I had an array of size m (num mines to place) where each element contained was a tuple containing x and y of all yet placed mines. When I was generating the mine positions I was checking the array if there is already a mine. What I didn’t had in mind was that the whole array was initialized with 0,0 x,y entries. In the last validator I rolled a mine on pos 0,0. I checked the array and detected a mine at 0,0 but this was an error. I’ve replaced that array with a List that grows dynamically and the error was fixed. Thanks for all the people in the discord that pointed me in the right direction