[Point](https://artofproblemsolving.com/wiki/index.php/Point) $B$ is on $\overline{AC}$ with $AB = 9$ and $BC = 21.$ Point $D$ is not on $\overline{AC}$ so that $AD = CD,$ and $AD$ and $BD$ are [integers](https://artofproblemsolving.com/wiki/index.php/Integer). Let $s$ be the sum of all possible [perimeters](https://artofproblemsolving.com/wiki/index.php/Perimeter) of $\triangle ACD$. Find $s.$
Denote the height of $\triangle ACD$ as $h$, $x = AD = CD$, and $y = BD$. Using the [Pythagorean theorem](https://artofproblemsolving.com/wiki/index.php/Pythagorean_theorem), we find that $h^2 = y^2 - 6^2$ and $h^2 = x^2 - 15^2$. Thus, $y^2 - 36 = x^2 - 225 \Longrightarrow x^2 - y^2 = 189$. The LHS is [difference of squares](https://artofproblemsolving.com/wiki/index.php/Difference_of_squares), so $(x + y)(x - y) = 189$. As both $x,\ y$ are integers, $x+y,\ x-y$ must be integral divisors of $189$. 
The pairs of divisors of $189$ are $(1,189)\ (3,63)\ (7,27)\ (9,21)$. This yields the four potential sets for $(x,y)$ as $(95,94)\ (33,30)\ (17,10)\ (15,6)$. The last is not a possibility since it simply [degenerates](https://artofproblemsolving.com/wiki/index.php/Degenerate) into a [line](https://artofproblemsolving.com/wiki/index.php/Line). The sum of the three possible perimeters of $\triangle ACD$ is equal to $3(AC) + 2(x_1 + x_2 + x_3) = 90 + 2(95 + 33 + 17) = \boxed{380}$.