Cody

Solution 519699

Submitted on 3 Nov 2014 by Binbin Qi
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
%% assert(isequal(repeatingdec(1),'0'))

2   Pass
%% assert(isequal(repeatingdec(3/7),'428571'))

y = 428571

3   Pass
%% assert(isequal(repeatingdec(.3456345612323),''))

y = 3456 y = ''

4   Pass
%% assert(isequal(repeatingdec(1/pi),''))

y = 8 y = ''

5   Pass
%% assert(isequal(repeatingdec(1/13),'076923'))

y = 076923

6   Pass
%% assert(isequal(repeatingdec(2/33),'06'))

y = 06

7   Pass
%% assert(isequal(repeatingdec(.789789789789789789),'789'))

y = 789

8   Pass
%% assert(isequal(repeatingdec(.78978978938383838),''))

y = 789 y = ''

9   Pass
%% assert(isequal(repeatingdec(1/exp(1)),''))

y = 4 y = ''

10   Pass
%% assert(isequal(repeatingdec(.78787878787833333),''))

y = 78 y = ''

11   Pass
%% assert(isequal(repeatingdec(.123451234512345),'12345'))

y = 12345

12   Pass
%% assert(isequal(repeatingdec(1/100),''))

13   Pass
%% assert(isequal(repeatingdec(1/62),''))

y = 2 y = ''

14   Pass
%% assert(isequal(repeatingdec(1/16),''))

15   Pass
%% assert(isequal(repeatingdec(1/91),'010989'))

y = 010989

16   Pass
%% assert(isequal(repeatingdec(0),'0'))