111+113+115+117+119+131+133+135+137+......+199
+311+313+315+317+319+.....+399+
511+513+.....+599 +
711+713+715+717+.....+799+
911+.....+999
why i seperate it into 5 columns?
because the differences of the corresponding numbers in adjacent columns are all 200
there are 25 numbers in each column
so the sum equals (Let x be (111+113+......+199) because i am too lazy)
x+ (25*200+ x) + (25*200*2 + x) + (25*200*3 + x) + (25*200*4 + x)
if we can find out what the actual value of x is, the problem would be much easier
x = (110+ 111 + 112 + 113 + ...... + 199) - (110+112+114+116+......+198) - (120 + 122 + .... + 128) - (140 + 142 + 144 + ... +148) - (160 + 162 + ... +168) - (180 + 182 + ... + 188)
= (110 + 199) * 90/2 - (110 + 198)* 45/2 - (120 + 128) *5/2 - (140 + 148) *5/2 - (160 + 168) *5/2 - (180+188)*5/2
= 13905 - 6390 - 620 - 720 - 820 - 920
= 4735
There we go!! We found the actual value of x
Next step we calculate x+ (25*200+ x) + (25*200*2 + x) + (25*200*3 + x) + (25*200*4 + x)
= 4735 + 5000 + 4735 + 10000 + 4735 + 15000 + 4735 + 20000 + 4735
= 73675
So the sum of all 3-digit numbers whose digits are all odd is 73675
P.S. I don't know and I don't understand any C or P. So I used my own method to do the problem