当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

3083:The Mystery of Triangle

题目描述
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(平行四边形).
输入解释
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.

输出解释
Each test case contains three lines. Print answers % 20091226.

输入样例
2
3
输出样例
Triangle: 5
Diamond: 3
Parallelogram: 3
Triangle: 13
Diamond: 9
Parallelogram: 15
来自杭电HDUOJ的附加信息
Author B.A.C
Recommend lcy

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-3083

最后修改于 2020-10-25T22:59:51+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 32768/32768K(Java/Others)