Pergunta de entrevista da empresa SAP

Valid perfect square, and street lights problem (simulation)