Hi, DP. You have created a nice problem here: well done. Could you please clarify/check/amend one detail though. In the Problem Statement it stipulates the sum must be that "less than" maxval. So if maxval=1, then the series would have no terms (hence sum=0); alternatively, if it had one term, then the sum (1²=1) would be "less than or equal to" maxval, as implied in the Test Suite. Thanks, DIV
Thanks for the clarification!
This submission has evidently been copied from 'somewhere', because it is _identical_ to Solution 1499384 (submitted on 21 Apr 2018 by J. S. Kowontan). It would be good professional practice to _at least_ acknowledge the source. Moreover I don't see the point of submitting a verbatim copy of somebody else's solution; it does not bring any credit. —DIV
262 Solvers
356 Solvers
555 Solvers
Matrix of almost all zeros, except for main diagonal
154 Solvers
570 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!