I’m trying to solve a problem


The following error message occurs.
Error: time limit exceeded)
and i can’t figure out this (
here is my solution

Tnx