Subject :IMO Class : Class 4

Find the difference between the greatest 6-digit number and smallest 5-digit number formed by using the digits 9, 8, 3, 4 (each digit must be used at least once).

A966354

B90654

C963546

D963564

greatest number is 999843 and smallest number is 33489.