Sponsored
Use these hints if you're stuck. Try solving on your own first.
Iterate over the diagonals of the matrix and check for each element.
Check if the element is prime or not in O(sqrt(n)) time.
Solve with full IDE support and test cases