Hi @semki - the tests are designed to time out nested loops.
You've made good progress - you've found a correct way to add up the areas. Now ask yourself, how can you improve it? Do you really need to perform ALL the calculations in your nested loops? Hopefully this will help you find an even better solution.
There is a way to nest 2 loops to get it ro pass. There is a clue in the 40000 N test case set description.
maybe dont use loops at all - i tried to do it with one loop and it timed out
Hi @semki - the tests are designed to time out nested loops.
You've made good progress - you've found a correct way to add up the areas. Now ask yourself, how can you improve it? Do you really need to perform ALL the calculations in your nested loops? Hopefully this will help you find an even better solution.
You cannot (really) optimize nested loop. You need to find a solution with a single loop or it won't pass.