How many 3 digits numbers can be formed using 0,1,2,3 and they should be divisible by 3?

How do we solve this question ?

I think you first need to figure out how many 3 digit number you can make with those digit and after that I think we use the logic that every 1 in three number will be a divisible of 3 thus, we divide the total by 3 to get the answer, although you need to work my reason to figure if its correct or not.

another approach manual:

the sums of the digits have to divisible by 3.

So, Fix the hundreds digit, then see how many possible.

i.e.: put 1 first, the sum of the next two digits have to be 2 or 5. so; 0,2(102); 2,0(120); 1,1; 2,3; 3,2

put 2 fist; the next two: 0,1; 1,0; 2,2; 1,3; 3,1

3 first: 0,0; 2,1; 1,2; 0,3; 3,0; 3,3

do you have the answer to this ? would it be 18 ?

nope i donâ€™t have the ans to this