1512_Blocks

2022-5-16 18:17| 发布者: Hocassian| 查看: 46| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-2-89503872215999-Problem List-采集的数据-后羿采集器.html

Pro.ID

1512

Title

Blocks

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=1512

AC

115

Submit

231

Ratio

49.78%

时间&空间限制

  • Time Limit: 200/100 MS (Java/Others)     Memory Limit: 32768/32768 K (Java/Others)
  • 描述

    Donald wishes to send a gift to his new nephew, Fooey. Donald is a bit of a traditionalist, so he has chosen to send a set of N classic baby blocks. Each block is a cube, 1 inch by 1 inch by 1 inch. Donald wants to stack the blocks together into a rectangular solid and wrap them all up in brown paper for shipping. How much brown paper does Donald need?

    输入

    The first line of input contains C, the number of test cases. For each case there is an additional line containing N, the number of blocks to be shipped. N does not exceed 1000.

    输出

    Description

    Donald wishes to send a gift to his new nephew, Fooey. Donald is a bit of a traditionalist, so he has chosen to send a set of N classic baby blocks. Each block is a cube, 1 inch by 1 inch by 1 inch. Donald wants to stack the blocks together into a rectangular solid and wrap them all up in brown paper for shipping. How much brown paper does Donald need?

    Input

    The first line of input contains C, the number of test cases. For each case there is an additional line containing N, the number of blocks to be shipped. N does not exceed 1000.

    Output

    Your program should produce one line of output per case, giving the minimal area of paper (in square inches) needed to wrap the blocks when they are stacked together.

    Sample Input

    5
    9
    10
    26
    27
    100

    Sample Output

    30
    34
    82
    54
    130

    Source

    样例输入

    5
    9
    10
    26
    27
    100

    样例输出

    30
    34
    82
    54
    130

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部