Number of combinations of choosing 4 digits out of 4 =‌5C4=5 Each 4-digit set can be arranged in 4! ways =24 ways So, total number of 4 -digit numbers =5×24=120 In each group, each digit appears ‌
24
4
=6‌ times ‌ So, contribution per group =‌ sum of digits ‌×6×(1000+100+10+1) Now, compute total sum of digits for all 5 groups &(2+3+5+8)+(1+3+5+8) +(1+2+5+8)+(1+2+3+8) +(1+2+3+5) ‌‌=18+17+16+14+11=76 ‌‌=76×6666 ‌‌ Hence, total sum ‌=506616