

Time Limit: 2 sec / Memory Limit: 1024 MB
配点 : 300 点
問題文
正の整数 L が与えられます。 縦、横、高さの長さ (それぞれ、整数でなくてもかまいません) の合計が L の直方体としてありうる体積の最大値を求めてください。
制約
- 1 ≤ L ≤ 1000
- L は整数
入力
入力は以下の形式で標準入力から与えられる。
L
出力
縦、横、高さの長さの合計が L の直方体としてありうる体積の最大値を出力せよ。 なお、想定解答との絶対誤差または相対誤差が 10^{-6} 以下であれば正解として扱われる。
入力例 1
3
出力例 1
1.000000000000
例えば 縦 0.8 、横 1 、高さ 1.2 の直方体の体積は 0.96 です。
一方、縦 1 、横 1 、高さ 1 とすると直方体の体積は 1 で、より体積が大きいです。
入力例 2
999
出力例 2
36926037.000000000000
Score : 300 points
Problem Statement
Given is a positive integer L. Find the maximum possible volume of a rectangular cuboid whose sum of the dimensions (not necessarily integers) is L.
Constraints
- 1 ≤ L ≤ 1000
- L is an integer.
Input
Input is given from Standard Input in the following format:
L
Output
Print the maximum possible volume of a rectangular cuboid whose sum of the dimensions (not necessarily integers) is L. Your output is considered correct if its absolute or relative error from our answer is at most 10^{-6}.
Sample Input 1
3
Sample Output 1
1.000000000000
For example, a rectangular cuboid whose dimensions are 0.8, 1, and 1.2 has a volume of 0.96.
On the other hand, if the dimensions are 1, 1, and 1, the volume of the rectangular cuboid is 1, which is greater.
Sample Input 2
999
Sample Output 2
36926037.000000000000