8 = 1 × 2 × 2 × 2 = 23
12 = 1 × 2 × 2 × 3 = 22 × 31
18 = 1 × 2 × 3 × 3 = 21 × 32
40 = 1 × 2 × 2 × 2 × 5 = 23 × 51
45 = 1 × 3 × 3 × 5 = 32 × 51
LCM of 8, 12, 18, 40 and 45 = 23 × 32 × 51 = 360
Smallest five digit number is 10000
Now, if we divide 10000 by 360, we will get 27.78 as quotient.
The integer just greater than 27.78 is 28
∴ Required number = 360 × 28 = 10080
Hence, the least number of five digits which is exactly divisible by each of 8, 12, 18, 40 and 45 is 10080.