Cody

Solution 1731962

Submitted on 20 Feb 2019 by Alfonso Nieto-Castanon
  • Size: 89
  • 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
tic; SUM = euler249(10) toc; assert(isequal(SUM, uint64(7)))

SUM = uint64 7 Elapsed time is 0.042467 seconds.

2   Pass
tic; SUM = euler249(100) toc; assert(isequal(SUM, uint64(5253640)))

SUM = uint64 5253640 Elapsed time is 0.012333 seconds.

3   Pass
tic; SUM = euler249(1000) toc; assert(isequal(SUM, uint64(5725053962252706)))

SUM = uint64 5725053962252706 Elapsed time is 0.211140 seconds.

4   Pass
tic; SUM = euler249(2000) toc; assert(isequal(SUM, uint64(9536598422264105)))

SUM = uint64 9536598422264105 Elapsed time is 0.942075 seconds.

5   Pass
tic; SUM = euler249(4900) toc; assert(isequal(SUM, uint64(2455225028344813)))

SUM = uint64 2455225028344813 Elapsed time is 13.657428 seconds.