Cody

Solution 613639

Submitted on 8 Apr 2015 by Yalong Liu
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, sign in.

Test Suite

Test Status Code Input and Output
1   Pass
%% N = 2; K = 7; assert(sum_reciprocals(N,K)-2.01554407485016762<1e-8)

2   Pass
%% N = 5; K = 7; assert(sum_reciprocals(N,K)-1.440856832360981609753<1e-8)

3   Pass
%% N = 8; K = 9; assert(sum_reciprocals(N,K)-1.0714523172876426748<1e-8)

4   Pass
%% N = 2:8; K = 9; M = arrayfun(@(x)sum_reciprocals(x,K),N); R = spline(N,M,[3.3 5.93]); assert(all(R-[1.7588093884770861, 1.3325666476222477463]<1e-8))