I need help with this problem Triangles Problem Idea: The given input is N the level of the triangle, how can I calculate the number of all fragments(lines that contain one or more line segments in the triangle)? Do you have any ideas? I tried N!/2 but it is not efficient and probably incorrect becase 1<= N=2m < 64000.
Sample Input:
3 (number of tests)
1
2
4
Sample Output:
3
12
60