All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Sum Six Digit Even Numbers (Posted on 2023-08-22) Difficulty: 3 of 5
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.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution different answer | Comment 2 of 4 |
wrong answer below:

clearvars
tot=0; ct=0;
invalid='6':'9';
for n=100000:2:555558
  ns=char(string(n));
  tst=setdiff(invalid,ns);
  if length(tst)==4
    if ~isequal(ns,unique(ns))
      ct=ct+1;
      tot=tot+n;
    end
  end
end
tot
ct

finds

The  19,440 possible values add up to 6,371,984,880.

Edited on August 22, 2023, 2:46 pm
  Posted by Charlie on 2023-08-22 14:34:46

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (9)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information