Determine the sum of all possible values of a six digit (non leading zero) even number N that uses only the digits 0, 1, 2, 3, 4, 5.
- All the six digits may not appear in N, so that 543210 is NOT a valid entry.
- Some of these six digits can be repeated more than once in N.
(In reply to
different answer by Charlie)
The line
if ~isequal(ns,unique(ns))
should have been
if ~isequal(sort(ns),unique(ns))
as the unique function returns a sorted value
After correction, the answer comes out the same as Larry's
|
Posted by Charlie
on 2023-08-22 14:49:03 |