Hello, can you explain how to solve this problem, please?
Problem

Thank you!
Hello, can you explain how to solve this problem, please?
A circle with a diameter of 2n-1 is symmetrically drawn on a chessboard of 2nx2n cells. Through how many squares of the board does this circle pass and how many squares will fit completely inside this circle? E.g if n = 4, then answer is, completely inside: 4, pass: 12;

Thank you!
| № | Пользователь | Рейтинг |
|---|---|---|
| 1 | Benq | 3857 |
| 2 | jiangly | 3810 |
| 3 | maroonrk | 3534 |
| 4 | tourist | 3528 |
| 5 | Kevin114514 | 3510 |
| 6 | turmax | 3411 |
| 7 | Um_nik | 3387 |
| 8 | Radewoosh | 3367 |
| 9 | heuristica | 3322 |
| 10 | strapple | 3317 |
| Страны | Города | Организации | Всё → |
| № | Пользователь | Вклад |
|---|---|---|
| 1 | Qingyu | 158 |
| 2 | maspy | 150 |
| 3 | Um_nik | 146 |
| 4 | Errichto | 139 |
| 5 | adamant | 136 |
| 6 | maroonrk | 134 |
| 7 | DNR | 133 |
| 8 | nik_exists | 131 |
| 8 | Dominater069 | 131 |
| 10 | Proof_by_QED | 130 |
| Название |
|---|



What is the data range of n?
n <= 10^4
Then if n<=10^4,use brute force to solve it.
Check this problem. The solution to this one is similar to your problem.
Oh, maybe I solved it.
Code: