ChatGPT couldnt solve because it tries to guess the code. But Deepmind is developing Alphacode which can generate the code and debug for the errors. It also participated in CF contest and ranked within top 54%.