1:
You can draw a circle with an inner triangle in the circle. When we put the second triangle, we convert it to turning the existing first triangle around the concentric axis a little bit to the right (the same as the left turn). Then, each side of the second triangle will intersection Two Sides of the first triangle. In this way, 3*1*2 + 2 areas are available, and 3 indicates 3 sides, 1 indicates that each side of the second triangle will intersection Two Sides of the first triangle to get a triangle. 2 indicates two triangles, + 2 indicates a region in which the outer region and the two triangles share the same region. Similarly, the third triangle will have two edges with the first and second triangles. Available: 3*2*3 + 2
Available from some, n triangles: 3 * (n-1) * n + 2
2:
Recursive Formula: a [I] = a [I-1] + (I-1) * 6
[Csharp]
# Include "stdio. h"
Int a [10010];
Int main ()
{
Int I, t, n;
A [1] = 2; a [2] = 8;
For (I = 3; I <= 10000; I ++)
A [I] = a [I-1] + 2 * (I-1) * 3;
Scanf ("% d", & t );
While (t --)
{
Scanf ("% d", & n );
Printf ("% d \ n", a [n]);
}
Return 0;
}