#P2807. 三角形计数
三角形计数
Description
Divide each side of the large triangle into equal parts. Connect the corresponding division points, with the connecting lines respectively parallel to the three sides. How many triangles are there in total? Write a program to solve this problem.
Input Format
The first line contains an integer (), indicating the number of test cases. The next lines each contain a positive integer ().
Output Format
For each , output a single positive integer, representing the number of triangles.
3
1
2
3
1
5
13
Hint
Translated by ChatGPT 5
京公网安备 11011102002149号