Cody

Solution 1311696

Submitted on 24 Oct 2017 by David Verrelli
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 = 5; assert(isequal(is_it_really_a_5(n),1))

nTxtBigEndian = '5' theFives = logical 1 theFives = logical 1 ans = logical 1

2   Pass
n = 15; assert(isequal(is_it_really_a_5(n),0))

nTxtBigEndian = '51' theFives = 1×2 logical array 1 0 theFives = 1×2 logical array 0 0 ans = logical 0

3   Pass
n = 25; assert(isequal(is_it_really_a_5(n),1))

nTxtBigEndian = '52' theFives = 1×2 logical array 1 0 theFives = 1×2 logical array 1 0 ans = logical 1

4   Pass
n = 35; assert(isequal(is_it_really_a_5(n),1))

nTxtBigEndian = '53' theFives = 1×2 logical array 1 0 theFives = 1×2 logical array 1 0 ans = logical 1

5   Pass
n = 50; assert(isequal(is_it_really_a_5(n),0))

nTxtBigEndian = '05' theFives = 1×2 logical array 0 1 theFives = 1×2 logical array 0 0 ans = logical 0

6   Pass
n = 52; assert(isequal(is_it_really_a_5(n),0))

nTxtBigEndian = '25' theFives = 1×2 logical array 0 1 theFives = 1×2 logical array 0 0 ans = logical 0

7   Pass
n = 55; assert(isequal(is_it_really_a_5(n),1))

nTxtBigEndian = '55' theFives = 1×2 logical array 1 1 theFives = 1×2 logical array 1 0 ans = logical 1

8   Pass
n = 59; assert(isequal(is_it_really_a_5(n),0))

nTxtBigEndian = '95' theFives = 1×2 logical array 0 1 theFives = 1×2 logical array 0 0 ans = logical 0

9   Pass
n = 85; assert(isequal(is_it_really_a_5(n),1))

nTxtBigEndian = '58' theFives = 1×2 logical array 1 0 theFives = 1×2 logical array 1 0 ans = logical 1

10   Pass
n = 105; assert(isequal(is_it_really_a_5(n),1))

nTxtBigEndian = '501' theFives = 1×3 logical array 1 0 0 theFives = 1×3 logical array 1 0 0 ans = logical 1

11   Pass
n = 115; assert(isequal(is_it_really_a_5(n),0))

nTxtBigEndian = '511' theFives = 1×3 logical array 1 0 0 theFives = 1×3 logical array 0 0 0 ans = logical 0

12   Pass
n = 125; assert(isequal(is_it_really_a_5(n),1))

nTxtBigEndian = '521' theFives = 1×3 logical array 1 0 0 theFives = 1×3 logical array 1 0 0 ans = logical 1

13   Pass
n = 250; assert(isequal(is_it_really_a_5(n),0))

nTxtBigEndian = '052' theFives = 1×3 logical array 0 1 0 theFives = 1×3 logical array 0 0 0 ans = logical 0

14   Pass
n = 500; assert(isequal(is_it_really_a_5(n),1))

nTxtBigEndian = '005' theFives = 1×3 logical array 0 0 1 theFives = 1×3 logical array 0 0 1 ans = logical 1

15   Pass
n = 555; assert(isequal(is_it_really_a_5(n),1))

nTxtBigEndian = '555' theFives = 1×3 logical array 1 1 1 theFives = 1×3 logical array 1 0 1 ans = logical 1

16   Pass
n = 5000; %5,000 assert(isequal(is_it_really_a_5(n),1))

nTxtBigEndian = '0005' theFives = 1×4 logical array 0 0 0 1 theFives = 1×4 logical array 0 0 0 1 ans = logical 1

17   Pass
n = 15000; %15,000 assert(isequal(is_it_really_a_5(n),0))

nTxtBigEndian = '00051' theFives = 1×5 logical array 0 0 0 1 0 theFives = 1×5 logical array 0 0 0 0 0 ans = logical 0

18   Pass
n = 55555; %55,555 assert(isequal(is_it_really_a_5(n),1))

nTxtBigEndian = '55555' theFives = 1×5 logical array 1 1 1 1 1 theFives = 1×5 logical array 1 0 1 1 0 ans = logical 1

19   Pass
n = 50000; %50,000 assert(isequal(is_it_really_a_5(n),0))

nTxtBigEndian = '00005' theFives = 1×5 logical array 0 0 0 0 1 theFives = 1×5 logical array 0 0 0 0 0 ans = logical 0

20   Pass
n = 55000; %55,000 assert(isequal(is_it_really_a_5(n),1))

nTxtBigEndian = '00055' theFives = 1×5 logical array 0 0 0 1 1 theFives = 1×5 logical array 0 0 0 1 0 ans = logical 1

21   Pass
n = 50500; %50,500 assert(isequal(is_it_really_a_5(n),1))

nTxtBigEndian = '00505' theFives = 1×5 logical array 0 0 1 0 1 theFives = 1×5 logical array 0 0 1 0 0 ans = logical 1

22   Pass
n = 50050; %50,050 assert(isequal(is_it_really_a_5(n),0))

nTxtBigEndian = '05005' theFives = 1×5 logical array 0 1 0 0 1 theFives = 1×5 logical array 0 0 0 0 0 ans = logical 0

23   Pass
n = 50005; %50,005 assert(isequal(is_it_really_a_5(n),1))

nTxtBigEndian = '50005' theFives = 1×5 logical array 1 0 0 0 1 theFives = 1×5 logical array 1 0 0 0 0 ans = logical 1

24   Pass
n = 500000; %500,000 assert(isequal(is_it_really_a_5(n),1))

nTxtBigEndian = '000005' theFives = 1×6 logical array 0 0 0 0 0 1 theFives = 1×6 logical array 0 0 0 0 0 1 ans = logical 1

25   Pass
n = 5000000; %5,000,000 assert(isequal(is_it_really_a_5(n),1))

nTxtBigEndian = '0000005' theFives = 1×7 logical array 0 0 0 0 0 0 1 theFives = 1×7 logical array 0 0 0 0 0 0 1 ans = logical 1

26   Pass
n = 15000000; %15,000,000 assert(isequal(is_it_really_a_5(n),0))

nTxtBigEndian = '00000051' theFives = 1×8 logical array 0 0 0 0 0 0 1 0 theFives = 1×8 logical array 0 0 0 0 0 0 0 0 ans = logical 0

27   Pass
n = 50000000; %50,000,000 assert(isequal(is_it_really_a_5(n),0))

nTxtBigEndian = '00000005' theFives = 1×8 logical array 0 0 0 0 0 0 0 1 theFives = 1×8 logical array 0 0 0 0 0 0 0 0 ans = logical 0

28   Pass
n = 105000000; %105,000,000 assert(isequal(is_it_really_a_5(n),1))

nTxtBigEndian = '000000501' theFives = 1×9 logical array 0 0 0 0 0 0 1 0 0 theFives = 1×9 logical array 0 0 0 0 0 0 1 0 0 ans = logical 1

29   Pass
n = 50050050; %50,050,050 assert(isequal(is_it_really_a_5(n),0))

nTxtBigEndian = '05005005' theFives = 1×8 logical array 0 1 0 0 1 0 0 1 theFives = 1×8 logical array 0 0 0 0 0 0 0 0 ans = logical 0

30   Pass
n = 50000005; %50,000,005 assert(isequal(is_it_really_a_5(n),1))

nTxtBigEndian = '50000005' theFives = 1×8 logical array 1 0 0 0 0 0 0 1 theFives = 1×8 logical array 1 0 0 0 0 0 0 0 ans = logical 1

31   Pass
n = 50000015; %50,000,015 assert(isequal(is_it_really_a_5(n),0))

nTxtBigEndian = '51000005' theFives = 1×8 logical array 1 0 0 0 0 0 0 1 theFives = 1×8 logical array 0 0 0 0 0 0 0 0 ans = logical 0

32   Pass
n = 500000000; %500,000,000 assert(isequal(is_it_really_a_5(n),1))

nTxtBigEndian = '000000005' theFives = 1×9 logical array 0 0 0 0 0 0 0 0 1 theFives = 1×9 logical array 0 0 0 0 0 0 0 0 1 ans = logical 1

33   Pass
n = 5000000000; %5,000,000,000 assert(isequal(is_it_really_a_5(n),1))

nTxtBigEndian = '0000000005' theFives = 1×10 logical array 0 0 0 0 0 0 0 0 0 1 theFives = 1×10 logical array 0 0 0 0 0 0 0 0 0 1 ans = logical 1

34   Pass
n = 50000000000; %50,000,000,000 assert(isequal(is_it_really_a_5(n),0))

nTxtBigEndian = '00000000005' theFives = 1×11 logical array 0 0 0 0 0 0 0 0 0 0 1 theFives = 1×11 logical array 0 0 0 0 0 0 0 0 0 0 0 ans = logical 0