N Queens
Put N queens on an N by N board so that none of them can attack each other. That's the whole puzzle.
Back in 2019 I was learning Batch, the .bat scripting language that cmd.exe runs on Windows. We were doing it in class and my entire toolbox was if and variables. As far as I knew, the language had no loops at all, and to be fair I did not know what a loop was yet either :P
Around that time I watched a video from Derivando about the 1000 queens problem, and I loved it. So naturally I decided I was going to solve it myself. In Batch. With if and variables.
It took more than 20 hours across one weekend. x_x But it ran, and it worked, and it started dumping solutions into a .txt file.
I showed it to my classmates before break. We went out, came back, and there were two new solutions sitting in the file that were not there when we left. It had just been quietly working the whole time. I do not think I have felt prouder of anything since :')
800+ lines of Batch, for a problem that did not need a single one of them to be written that way.
I rebuilt it this year and the difference is stupid. The old one threw queens down at random and checked whether it had got lucky, which is why an 8x8 took anywhere from 5 min to 20 min. The new one backtracks: it puts a queen down, and the second the board cannot work it steps back instead of starting the whole thing over.
Same puzzle, 876 positions tried instead of however many million random boards I was getting through back then.