Replace in by the smallest number so that the number formed is divisible by and not by .
Divisiblity rule for = if the sum of digits of a number is divisible by
Divisibility rule for = if the sum of digits of a number is divisible by
The number will be divisible by only when sum of digits is also divisible by but the sum of digits must not be divisible by as per question.
So, sum of digits of a number =
Next number greater than which is a multiple of
is also not divisible by
hence required number =