F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

The Mystery of Triangle

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 250    Accepted Submission(s): 83


Problem 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
 

Author
B.A.C
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-22 18:51:29, Gzip enabled