• Running slow

Question related to mission Break Rings

 

I'm having an issue with the test

({11,7}, {10,5}, {4,6}, {3,4}, {19,14},

{1,17}, {8,4}, {18,3}, {17,12}, {16,11},

{9,11},{2,6}, {11,4}, {17,3}, {13,6},

{11,20}, {11,15}, {8,3}, {5,7})

Pycharm just can't finish executing this but I am able to get the answer (7) on my own computer with my code. Has anyone had an issue with this or any advice?