loop will execute 30x30x30 =27000 times but since the condition is for multiples of 3 so
value of d incremented for i+j+k =3,6,9......etc
i.e for i=1, j=1,k=1,4,7,10...28(10 times)
similarly for i= 1 , j=2 ,k=3,6,9...29(10 times) so in general for i=1 there will be 30*10 =300 such combinations for each i
and in total (i=1 to 30 ) =300*30 =9000
hence ans is A