Cody

Solution 1997456

Submitted on 31 Oct 2019 by Nikolaos Nikolaou
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
x = 25; y=sumOfSqr(x); v=y(1)^2 + y(2)^2; assert(isequal(x,v)) assert(round(y(1))==y(1)) assert(round(y(2))==y(2))

m = 5 y = 4 3

2   Pass
x = 41; y=sumOfSqr(x); v=y(1)^2 + y(2)^2; assert(isequal(x,v)) assert(round(y(1))==y(1)) assert(round(y(2))==y(2))

m = 6 y = 5 4

3   Pass
x = 7; y=sumOfSqr(x); assert(isempty(y));

m = 2 y = []

4   Pass
x = 391250; y=sumOfSqr(x); v=y(1)^2 + y(2)^2; assert(isequal(x,v)) assert(round(y(1))==y(1)) assert(round(y(2))==y(2))

m = 625 y = 485 395

5   Pass
x = 288; y=sumOfSqr(x); v=y(1)^2 + y(2)^2; assert(isequal(x,v)) assert(round(y(1))==y(1)) assert(round(y(2))==y(2))

m = 16 y = 12 12

6   Pass
x = 1; y=sumOfSqr(x); v=y(1)^2 + y(2)^2; assert(isequal(x,v)) assert(round(y(1))==y(1)) assert(round(y(2))==y(2))

m = 1 y = 0 1 y = 0 1