Digit sum with given constraints

Find the sum of all 3-digit natural numbers that contains at least one odd digit and one even digit.


The answer is 370775.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

We have to find sum of all the 3 digit numbers with all even and all odd digits and subtract it from the sum of all 3 digit numbers

_ _ _ let this be a 3 digit number

So with 1 in hundred place 1,3,5,7,9 will repeat 25 times

because of similarity sum of all odd digit 3 digit numbers is 2500(1+3+5+7+9)+250(1+3+5+7+9)+25(1+3+5+7+9)=69375

similarly for even digits it is 2500(0+2+4+6+8)+250(0+2+4+6+8)+25(0+2+4+6+8)=55500

But we have to subtract the numbers with 0 in hundreds place, as they are 2 digit numbers 50(2+4+6+8)+5(2+4+6+8)=1100

now sum of all the 3 digit numbers is n/2*[2a+(n-1)d]=494550

so final sum is = 494550-(69375+55500-1100)=370775

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...