A dog is standing at the bottom left corner of a grid of 46×46 streets. The dog is trying to get to the top right corner of the grid, where it knows there is some food. As the dog runs, between the corners, it will only ever run up and to the right. Any time the dog runs to the right, it runs at least 4 consecutive blocks to the right, and any time it runs up, it runs at least 12 consecutive blocks up. How many different intersections are unreachable for the dog by following these rules?

Details and assumptions
The last stretch that the dog runs must also satisfy the condition on the minimum number of consecutive blocks.

Can you even calculate 46*46?

bhai tu kar sakta hai toh ques hi karke dikha de

I already solved it..

To determine the number of unreachable intersections, we can use combinatorics and divide the problem into sections.

First, let's consider the number of columns that the dog can reach. Since the dog must run at least 4 consecutive blocks to the right, it can reach any column that has a positive remainder when divided by 4. In a 46x46 grid, there are 46 columns. Dividing 46 by 4 gives us 11 with a remainder of 2 (46 = 4 * 11 + 2). So, the dog can reach 11 columns.

Next, let's consider the number of rows that the dog can reach. Since the dog must run at least 12 consecutive blocks up, it can reach any row that has a positive remainder when divided by 12. In a 46x46 grid, there are 46 rows. Dividing 46 by 12 gives us 3 with a remainder of 10 (46 = 12 * 3 + 10). So, the dog can reach 3 rows.

Now, let's find the number of intersections that the dog can reach. Since the dog can reach 11 columns and 3 rows, the number of reachable intersections is equal to the product of the number of reachable columns and the number of reachable rows, which is 11 * 3 = 33.

To find the number of unreachable intersections, we subtract the number of reachable intersections from the total number of intersections in the grid. In a 46x46 grid, there are 46 columns and 46 rows, so the total number of intersections is 46 * 46 = 2116. Subtracting the number of reachable intersections (33) from the total number of intersections gives us 2116 - 33 = 2083.

Therefore, there are 2083 unreachable intersections for the dog to reach the top right corner of the grid.