To be divisible by 5 unit digit of number should be either 5 or 0
We have total 6 digits out of which we cannot have 0 at the hundred’s place (else it will become a 2 digit number)
Unit place is filled with 5
a. Tens place can be filled with 0
Hundreds place can now be filled with (2, 3, 6, 7). We have 4 ways
So we have 1*1*4
b. Tens place can be filled with any of the digits (2, 3, 6, 7). We have 4 ways
Hundreds place can now be filled with remaining of 3 digits. We have 3 ways
So we have 1*4*3
Unit place is filled with 0
Tens place can be filled with any of the digits (2, 3, 5, 6, 7). We have 5 ways
Hundreds place can now be filled with remaining of 3 digits. We have 4 ways
So we have 1*5*4
So Total number of ways = 1*1*4 + 1*4*3 + 1*5*4 = 36