编程介的小学生 2020-01-12 14:20 采纳率: 20.5%
浏览 89

The Mystery of Triangle 三角形的问题

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

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥50 永磁型步进电机PID算法
    • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
    • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
    • ¥15 如何处理复杂数据表格的除法运算
    • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
    • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
    • ¥200 uniapp长期运行卡死问题解决
    • ¥15 latex怎么处理论文引理引用参考文献
    • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
    • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?