Cody

# Problem 23. Finding Perfect Squares

Solution 1945893

Submitted on 22 Sep 2019 by Richard Finlan
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
a = [2 3 4]; assert(isequal(isItSquared(a),true))

row = 1 col = 3 exp = 2 exp = 3 exp = 4 exp = 2 exp = 3 exp = 4 exp = 2 b = logical 1 exp = 3 exp = 4

2   Pass
a = [20:30]; assert(isequal(isItSquared(a),false))

row = 1 col = 11 exp = 20 exp = 21 exp = 22 exp = 23 exp = 24 exp = 25 exp = 26 exp = 27 exp = 28 exp = 29 exp = 30 exp = 20 exp = 21 exp = 22 exp = 23 exp = 24 exp = 25 exp = 26 exp = 27 exp = 28 exp = 29 exp = 30 exp = 20 exp = 21 exp = 22 exp = 23 exp = 24 exp = 25 exp = 26 exp = 27 exp = 28 exp = 29 exp = 30 exp = 20 exp = 21 exp = 22 exp = 23 exp = 24 exp = 25 exp = 26 exp = 27 exp = 28 exp = 29 exp = 30 exp = 20 exp = 21 exp = 22 exp = 23 exp = 24 exp = 25 exp = 26 exp = 27 exp = 28 exp = 29 exp = 30 exp = 20 exp = 21 exp = 22 exp = 23 exp = 24 exp = 25 exp = 26 exp = 27 exp = 28 exp = 29 exp = 30 exp = 20 exp = 21 exp = 22 exp = 23 exp = 24 exp = 25 exp = 26 exp = 27 exp = 28 exp = 29 exp = 30 exp = 20 exp = 21 exp = 22 exp = 23 exp = 24 exp = 25 exp = 26 exp = 27 exp = 28 exp = 29 exp = 30 exp = 20 exp = 21 exp = 22 exp = 23 exp = 24 exp = 25 exp = 26 exp = 27 exp = 28 exp = 29 exp = 30 exp = 20 exp = 21 exp = 22 exp = 23 exp = 24 exp = 25 exp = 26 exp = 27 exp = 28 exp = 29 exp = 30 exp = 20 exp = 21 exp = 22 exp = 23 exp = 24 exp = 25 exp = 26 exp = 27 exp = 28 exp = 29 exp = 30

3   Pass
a = [1]; assert(isequal(isItSquared(a),true))

row = 1 col = 1 exp = 1 b = logical 1

4   Pass
a = [6 10 12 14 36 101]; assert(isequal(isItSquared(a),true))

row = 1 col = 6 exp = 6 exp = 10 exp = 12 exp = 14 exp = 36 exp = 101 exp = 6 exp = 10 exp = 12 exp = 14 exp = 36 exp = 101 exp = 6 exp = 10 exp = 12 exp = 14 exp = 36 exp = 101 exp = 6 exp = 10 exp = 12 exp = 14 exp = 36 exp = 101 exp = 6 b = logical 1 exp = 10 exp = 12 exp = 14 exp = 36 exp = 101 exp = 6 exp = 10 exp = 12 exp = 14 exp = 36 exp = 101

5   Pass
a = [6 10 12 14 101]; assert(isequal(isItSquared(a),false))

row = 1 col = 5 exp = 6 exp = 10 exp = 12 exp = 14 exp = 101 exp = 6 exp = 10 exp = 12 exp = 14 exp = 101 exp = 6 exp = 10 exp = 12 exp = 14 exp = 101 exp = 6 exp = 10 exp = 12 exp = 14 exp = 101 exp = 6 exp = 10 exp = 12 exp = 14 exp = 101