The Mystery of Triangle

Time Limit: 1000ms
Memory Limit: 32768KB
This problem will be judged on HDU. Original ID: 3083
64-bit integer IO format: %I64d      Java class name: Main

Description

There’re some unresolved problems of triangle so far. For example, whether there’s a three middle integer Helen triangle? It is unable to prove its existence until now; they have not found such a triangle. But I' m sure you can solve this problem. Now, there is an equilateral triangle(等边三角形),each edge is divided into two equal parts. Such as the picture

and if each edge is divided into three equal parts,
the triangle becomes

,now you task is to count the number of triangles, diamonds(菱形), and parallelograms(平行四边形).

Input

Each line will contain a integer n (1 < n < 2^31 - 1). It means each edge of triangle is divided into n equal parts. Process to the end of input.

Output

Each test case contains three lines. Print answers % 20091226.

Sample Input

2
3

Sample Output

Triangle: 5
Diamond: 3
Parallelogram: 3
Triangle: 13
Diamond: 9
Parallelogram: 15

Source

Language: 
Theme: 
Share Code? 

Powered by NB231 | Current Style: .