Solution:
The number of 4−digit numbers formed by using 0,2,4,7,8 without repetition =5P4−4P3=120−24=96.
Out of these 96 numbers,
4P3−3P2 numbers contain 2 in units place.
4P3−3P2 numbers contain 2 in tens place.
4P3−3P2 numbers contain 2 in hundreds place.
4P3 numbers contain 2 in units place.
∴ The values obtained by adding 2 in all numbers.
=(4P3−3P2)2+(4P3−3P2)20+(4P3−3P2)200+4P2×2000
=4P3(2+20+200+2000)−3P2(2+20+200)
=24×2222−6×222
=24×2×1111−6×2×111
Similarly, the value obtained by adding 4 is 24×4×1111−6×4×111.
The value obtained by adding 7 is 24×7×1111−6×7×111.
The value obtained by adding 8 is 24×8×1111−6×8×111.
∴ The sum of all numbers
=(24×2×1111−6×2×111)+ (24×4×1111−6×4×111)+ (24×7×1111−6×7×111)+ (24×8×1111−6×8×111)
=24×1111×(2+4+7+8)−6×111×(2+4+7+8)
=26664×21−666×21
=559944−13986
=545958