問題一覧 > 通常問題

No.375 Dividing a Cube into N Equal Parts (1)

レベル : / 実行時間制限 : 1ケース 5.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 179
作問者 : 👑 tails / テスター : 紙ぺーぱー
お気に入りにしたユーザー ProblemId : 489 / 自分の提出
問題文最終更新日: 2020-08-27 16:12:32
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 138 (順位表) の他の問題:

Problem Statement

We want to cut a cube with some number of planes to divide it into $N$ congruent rectangular cuboids.
How many planes should be used to cut the cube to obtain such a division?
Find the minimum value $Tmin$ and the maximum value $Tmax$ that the number of planes $T$ can take.

Note that the pieces of the cube are not moved; while the whole keeps the shape and position of the original cube,
the cuts are made with $T$ planes.

Input

$N$

$1 \lt N \lt 10^{11}$

$N$ is an integer.
The cube is divided into $N$ congruent rectangular cuboids.

Output

$Tmin$ $Tmax$

Output the minimum value $Tmin$ and the maximum value $Tmax$ of the number of planes.
Separate $Tmin$ and $Tmax$ with a single space.
Print a newline at the end.

Sample

Sample 1
Input
12
Output
4 11

As shown in red in the figure below, the cube can be divided into 12 congruent rectangular cuboids by cutting with 4 planes.
It cannot be divided with fewer planes, so $Tmin = 4$.

Also, the cube can be divided into 12 congruent rectangular cuboids by cutting with 11 planes parallel to the base.
It cannot be divided with more planes, so $Tmax = 11$.

Sample 2
Input
13
Output
12 12

No matter how the cube is cut, it is cut with 12 planes, so $Tmin = Tmax = 12$.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。