Cody

Solution 1768255

Submitted on 1 Apr 2019 by Bogdan Negrila
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))

n = 1 m = 3 x = 1.4142 k = [] k = [] k = [] x = 1.7321 k = [] k = [] k = [] x = 2 k = 1 k = [] k = []

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

n = 1 m = 11 x = 4.4721 k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] x = 4.5826 k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] x = 4.6904 k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] x = 4.7958 k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] x = 4.8990 k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] x = 5 k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] x = 5.0990 k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] x = 5.1962 k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] x = 5.2915 k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] x = 5.3852 k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] x = 5.4772 k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = [] k = []

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

n = 1 m = 1 x = 1 k = 1

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

n = 1 m = 6 x = 2.4495 k = [] k = [] k = [] k = [] k = [] k = [] x = 3.1623 k = [] k = [] k = [] k = [] k = [] k = [] x = 3.4641 k = [] k = [] k = [] k = [] k = [] k = [] x = 3.7417 k = [] k = [] k = [] k = [] k = [] k = [] x = 6 k = 1 k = [] k = [] k = [] k = [] k = [] x = 10.0499 k = [] k = [] k = [] k = [] k = [] k = []

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

n = 1 m = 5 x = 2.4495 k = [] k = [] k = [] k = [] k = [] x = 3.1623 k = [] k = [] k = [] k = [] k = [] x = 3.4641 k = [] k = [] k = [] k = [] k = [] x = 3.7417 k = [] k = [] k = [] k = [] k = [] x = 10.0499 k = [] k = [] k = [] k = [] k = []