Cody

Solution 616332

Submitted on 12 Apr 2015 by vic yang
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
%% n = 2; r_correct = -1; assert(isequal(imagine(n), r_correct))

2   Pass
%% n = 7; r_correct = -sqrt(-1); assert(isequal(imagine(n), r_correct))

3   Pass
%% n = 2520; r_correct = 1; assert(isequal(imagine(n), r_correct))

4   Pass
%% n = 999914001; r_correct = sqrt(-1); assert(isequal(imagine(n), r_correct))

Suggested Problems

More from this Author1