A main number has no divisors aside from one and by itself. The solution exams potential divisors up towards the square root from the amount — a basic optimisation worthy of knowledge.Copying an array with the assignment operator just copies the reference. To secure a definitely independent clone of