# [Community Puzzle] Magic Square

Coding Games and Programming Challenges to Code Better

Able to get all test cases passed but validator 2 on final submit is not passing. The similar test case was a list with a single entry. Any suggestions? Thank you.

Then you shouldnâ€™t pass the validators with numbers different from 1 to n^2 either, as thatâ€™s the case for validator 2.

Pay attention to every detail of the constrains.
Correct inputs are 1,2,3,4â€¦

0 and -1 are incorrect inputs
Inputs without 1 is incorrect.
Inputs of 1,2,4,5â€¦ missing 3 is incorrect
Inputs of 1,1,2â€¦ with duplication is incorrect
Inputs of 1.5, non integer, is incorrect

1 Like

Thank you. Your rec was the â€śmagicâ€ť.

Maybe you missed a condition.

The input array is a magic square and my output is that itâ€™s a magic square. But the output of the test says that itâ€™s not.

yes, â€śfilled with distinct positive integers in the range 1, 2 â€¦, nÂ˛â€ť

Edit: did I just nullify the educational measures of nicola?

2 Likes

distinctâ€¦ got it Thanks!

The 7â€™th test has a 7x7 array filled with 1 and itâ€™s a magic square. But the result of the test says that itâ€™s not magic. It wants displayed â€śMUGGLEâ€ť instead of â€śMAGICâ€ť. Am I missing something?

Output

I am having a problem with the final unknown validator 7. I know the answer is MUGGLE but why? I have a test for numbers 0 and below. I have a test case for duplicate numbers. I also have a case for missing numbers. I also know by rows, colms and diagonals can equal the magic number when possible.