Number is divisible by 3 if sum of digits is divisible by 3
Now 1+2+5+6+7=21
So to form a 4 digit number without repetition from the given digits one digit which is a multiple of 3 has to be excluded i.e. 6
∴1+5+2+7=15 is divisible by 3
Using 1,5,2,7 number of required 4 digit numbers =4!=24