Since each desired number is divisible by 5, so we must have 5 at the unit place. So, there is 1 way of doing it.
Tens place can be filled by any of the 7 numbers.
So, there are 6 ways of filling the tens place.
The hundreds place can now be filled by any one of the 7 digits. So there are 7 ways of filling it.
Same for thousand place also.
Required number of numbers(1*7*7*7) = 343