The sum of the areas of all triangles whose vertices are also vertices of a $1$ by $1$ by $1$ cube is $m + \sqrt{n} + \sqrt{p},$ where $m, n,$ and $p$ are [integers](https://artofproblemsolving.com/wiki/index.php/Integer). Find $m + n + p.$
[asy] size(120); import three; unitsize(1cm); draw((0,0,0)--(1,0,0)--(1,1,0)--(0,1,0)--(0,0,0)--(0,0,1)--(0,1,1)--(1,1,1)--(1,0,1)--(0,0,1)); draw((0,1,1)--(0,1,0)); draw((1,1,1)--(1,1,0)); draw((1,0,1)--(1,0,0)); draw((1,1,1)--(1,0,0)--(1,1,0)--(1,1,1), blue); [/asy]
[asy] size(120); import three; unitsize(1cm); draw((0,0,0)--(1,0,0)--(1,1,0)--(0,1,0)--(0,0,0)--(0,0,1)--(0,1,1)--(1,1,1)--(1,0,1)--(0,0,1)); draw((0,1,1)--(0,1,0)); draw((1,1,1)--(1,1,0)); draw((1,0,1)--(1,0,0)); draw((0,1,1)--(1,0,0)--(1,1,0)--(0,1,1), blue); [/asy]
[asy] size(120); import three; unitsize(1cm); draw((0,0,0)--(1,0,0)--(1,1,0)--(0,1,0)--(0,0,0)--(0,0,1)--(0,1,1)--(1,1,1)--(1,0,1)--(0,0,1)); draw((0,1,1)--(0,1,0)); draw((1,1,1)--(1,1,0)); draw((1,0,1)--(1,0,0)); draw((1,0,0)--(0,1,0)--(1,1,1)--(1,0,0), blue); [/asy]


Since there are $8$ [ vertices](https://artofproblemsolving.com/wiki/index.php/Vertex) of a [ cube](https://artofproblemsolving.com/wiki/index.php/Cube_(geometry)), there are ${8 \choose 3} = 56$ total [triangles](https://artofproblemsolving.com/wiki/index.php/Triangle) to consider.  They fall into three categories: there are those which are entirely contained within a single [face](https://artofproblemsolving.com/wiki/index.php/Face) of the cube (whose sides are two [edges](https://artofproblemsolving.com/wiki/index.php/Edge) and one face [diagonal](https://artofproblemsolving.com/wiki/index.php/Diagonal)), those which lie in a [plane](https://artofproblemsolving.com/wiki/index.php/Plane) [perpendicular](https://artofproblemsolving.com/wiki/index.php/Perpendicular) to one face of the cube (whose sides are one edge, one face diagonal and one space diagonal of the cube) and those which lie in a plane [oblique](https://artofproblemsolving.com/wiki/index.php?title=Oblique&action=edit&redlink=1) to the edges of the cube, whose sides are three face diagonals of the cube.  
Each face of the cube contains ${4\choose 3} = 4$ triangles of the first type, and there are $6$ faces, so there are $24$ triangles of the first type. Each of these is a [right triangle](https://artofproblemsolving.com/wiki/index.php/Right_triangle) with legs of length $1$, so each triangle of the first type has area $\frac 12$.
Each edge of the cube is a side of exactly $2$ of the triangles of the second type, and there are $12$ edges, so there are $24$ triangles of the second type. Each of these is a right triangle with legs of length $1$ and $\sqrt 2$, so each triangle of the second type has area $\frac{\sqrt{2}}{2}$.
Each vertex of the cube is associated with exactly one triangle of the third type (whose vertices are its three neighbors), and there are $8$ vertices of the cube, so there are $8$ triangles of the third type. Each of the these is an [equilateral triangle](https://artofproblemsolving.com/wiki/index.php/Equilateral_triangle) with sides of length $\sqrt 2$, so each triangle of the third type has area $\frac{\sqrt 3}2$.
Thus the total area of all these triangles is $24 \cdot \frac12 + 24\cdot\frac{\sqrt2}2 + 8\cdot\frac{\sqrt3}2 = 12 + 12\sqrt2 + 4\sqrt3 = 12 + \sqrt{288} + \sqrt{48}$ and the answer is $12 + 288 + 48 = \boxed{348}$.