Cody

Solution 812165

Submitted on 22 Jan 2016 by Peng Liu
  • Size: 11
  • This is the leading solution.
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 = 1; y_correct = 1; assert(isequal(ishappy(n),y_correct))

2   Pass
%% n = 2; y_correct = 0; assert(isequal(ishappy(n),y_correct))

3   Pass
%% n = 31; y_correct = 1; assert(isequal(ishappy(n),y_correct))

4   Pass
%% n = 13; y_correct = 1; assert(isequal(ishappy(n),y_correct))

5   Pass
%% n = 11; y_correct = 0; assert(isequal(ishappy(n),y_correct))

6   Pass
%% n = 101; y_correct = 0; assert(isequal(ishappy(n),y_correct))

7   Pass
%% n = 100; y_correct = 1; assert(isequal(ishappy(n),y_correct))

8   Pass
%% n = 130; y_correct = 1; assert(isequal(ishappy(n),y_correct))

9   Pass
%% n = 230; y_correct = 1; assert(isequal(ishappy(n),y_correct))

10   Pass
%% n = 190; y_correct = 1; assert(isequal(ishappy(n),y_correct))

11   Pass
%% n = 290; y_correct = 0; assert(isequal(ishappy(n),y_correct))

12   Pass
%% n = 998; y_correct = 1; assert(isequal(ishappy(n),y_correct))