Cody

Solution 2192921

Submitted on 5 Apr 2020 by drummer
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))

c = 1.4142 0 0 c = 1.4142 1.7321 0 c = 1.4142 1.7321 2.0000

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

c = 4.4721 0 0 0 0 0 0 0 0 0 0 c = 4.4721 4.5826 0 0 0 0 0 0 0 0 0 c = 4.4721 4.5826 4.6904 0 0 0 0 0 0 0 0 c = 4.4721 4.5826 4.6904 4.7958 0 0 0 0 0 0 0 c = 4.4721 4.5826 4.6904 4.7958 4.8990 0 0 0 0 0 0 c = 4.4721 4.5826 4.6904 4.7958 4.8990 5.0000 0 0 0 0 0 c = 4.4721 4.5826 4.6904 4.7958 4.8990 5.0000 5.0990 0 0 0 0 c = 4.4721 4.5826 4.6904 4.7958 4.8990 5.0000 5.0990 5.1962 0 0 0 c = 4.4721 4.5826 4.6904 4.7958 4.8990 5.0000 5.0990 5.1962 5.2915 0 0 c = 4.4721 4.5826 4.6904 4.7958 4.8990 5.0000 5.0990 5.1962 5.2915 5.3852 0 c = 4.4721 4.5826 4.6904 4.7958 4.8990 5.0000 5.0990 5.1962 5.2915 5.3852 5.4772

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

c = 1

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

c = 2.4495 0 0 0 0 0 c = 2.4495 3.1623 0 0 0 0 c = 2.4495 3.1623 3.4641 0 0 0 c = 2.4495 3.1623 3.4641 3.7417 0 0 c = 2.4495 3.1623 3.4641 3.7417 6.0000 0 c = 2.4495 3.1623 3.4641 3.7417 6.0000 10.0499

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

c = 2.4495 0 0 0 0 c = 2.4495 3.1623 0 0 0 c = 2.4495 3.1623 3.4641 0 0 c = 2.4495 3.1623 3.4641 3.7417 0 c = 2.4495 3.1623 3.4641 3.7417 10.0499