Problem:
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

Solution in C# (Mono 4.6.2.0) (judge verdict: Accepted)

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;

namespace AtCoderPractice
{
    class Program
    {


        /// <summary>
        /// 順列 (n >= k)
        /// </summary>
        public static long nPk(long n, long k)
        {
            if (n < k) return 0;
            if (n == k) return 1;

            long x = 1;
            for (long i = 0; i < k; i++)
            {
                x = x * (n - i);
            }
            return x;
        }

        /// <summary>
        /// 組み合わせ (n >= k)
        /// </summary>
        public static long nCk(long n, long k)
        {
            if (n < k) return 0;
            if (n == k) return 1;

            long x = 1;
            for (long i = 0; i < k; i++)
            {
                x = x * (n - i) / (i + 1);
            }
            return x;
        }

        const string AZ = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
        static void Main(string[] args)
        {
            var r = "";
            var b = false;
            var count = 0;
            var sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };
            Console.SetOut(sw);

            // 処理


            




            var v = StandardInputToLong();
            var cubeLine = v / 3.0M;



            r = (cubeLine * cubeLine * cubeLine).ToString("0.0000000000");



            // 処理

            //Console.WriteLine($"{(b ? "Yes" : "No")}");
            Console.WriteLine($"{r}");


            // 処理終了
            Console.Out.Flush();
            Console.ReadKey();
        }

        static bool isKaibun(string v)
        {
            int i = v.Length - 1;
            foreach(var c in v)
            {
                if(c != v[i])
                {
                    return false;
                }
                i--;
            }

            return true;
        }

        public static decimal Sqrt(decimal x, decimal? guess = null)
        {
            var ourGuess = guess.GetValueOrDefault(x / 2m);
            var result = x / ourGuess;
            var average = (ourGuess + result) / 2m;

            if (average == ourGuess) // This checks for the maximum precision possible with a decimal.
                return average;
            else
                return Sqrt(x, average);
        }

        #region 標準処理ライブラリ
        /// <summary>
        /// 半角スペース区切りの標準入力を文字列のIListに変換します。
        /// </summary>
        /// <returns></returns>
        static public IList<string> StandardInputToStrings()
        {
            return Console.ReadLine().Split(' ').ToList();
        }

        /// <summary>
        /// stringを取得
        /// </summary>
        /// <returns></returns>
        static public string StandardInputToString()
        {
            return Console.ReadLine();
        }

        /// <summary>
        /// 半角スペース区切りの標準入力を文字列のIListに変換します。複数行に対応。
        /// </summary>
        /// <returns></returns>
        static public IList<IList<string>> MultipleStandardInputToStrings()
        {
            string line;
            var r = new List<List<string>>();
            do
            {
                line = Console.ReadLine();
                r.Add(line.Split(' ').ToList());
                line = Console.ReadLine();
            } while (line == null);

            return (IList<IList<string>>)r;
        }

        /// <summary>
        /// 半角スペース区切りの標準入力を数値のIListに変換します。
        /// </summary>
        /// <returns></returns>
        static public IList<long> StandardInputToLongs()
        {
            return Console.ReadLine().Split(' ').Select(n => long.Parse(n)).ToList();
        }
        /// <summary>
        /// 半角スペース区切りの標準入力を数値のIListに変換します。
        /// </summary>
        /// <returns></returns>
        static public long StandardInputToLong()
        {
            return long.Parse(Console.ReadLine());
        }

        /// <summary>
        /// 半角スペース区切りの標準入力を文字列のIListに変換します。複数行に対応。
        /// </summary>
        /// <returns></returns>
        static public IList<IList<long>> MultipleStandardInputToLongs()
        {
            string line;
            var r = new List<List<long>>();
            do
            {
                line = Console.ReadLine();
                r.Add(line.Split(' ').Select(n => long.Parse(n)).ToList());
                line = Console.ReadLine();
            } while (line == null);

            return (IList<IList<long>>)r;
        }

        /// <summary>
        /// 半角スペース区切りの標準入力を数値のIListに変換します。
        /// </summary>
        /// <returns></returns>
        static public IList<int> StandardInputToInts()
        {
            return Console.ReadLine().Split(' ').Select(n => int.Parse(n)).ToList();
        }
        /// <summary>
        /// 半角スペース区切りの標準入力を数値のIListに変換します。
        /// </summary>
        /// <returns></returns>
        static public int StandardInputToInt()
        {
            return int.Parse(Console.ReadLine());
        }

        /// <summary>
        /// 半角スペース区切りの標準入力を文字列のIListに変換します。複数行に対応。
        /// </summary>
        /// <returns></returns>
        static public IList<IList<int>> MultipleStandardInputToInts()
        {
            string line;
            var r = new List<List<int>>();
            do
            {
                line = Console.ReadLine();
                r.Add(line.Split(' ').Select(n => int.Parse(n)).ToList());
                line = Console.ReadLine();
            } while (line == null);

            return (IList<IList<int>>)r;
        }
    }






    public static class AtCoderResultExtentions
    {
        static public string AsDelimitedResult<T>(this IList<T> ie, string delimitter = " ")
        {
            return string.Join(delimitter, ie);
        }
    }
    #endregion
    #region List拡張
    public static class IListExtensions
    {


        public static IEnumerable<IEnumerable<T>> Perm<T>(this IEnumerable<T> items, int? k = null)
        {
            if (k == null)
                k = items.Count();

            if (k == 0)
            {
                yield return Enumerable.Empty<T>();
            }
            else
            {
                var i = 0;
                foreach (var x in items)
                {
                    var xs = items.Where((_, index) => i != index);
                    foreach (var c in Perm(xs, k - 1))
                        yield return c.Before(x);

                    i++;
                }
            }
        }
        public static IEnumerable<IEnumerable<T>> Comb<T>(this IEnumerable<T> items, int r)
        {
            if (r == 0)
            {
                yield return Enumerable.Empty<T>();
            }
            else
            {
                var i = 1;
                foreach (var x in items)
                {
                    var xs = items.Skip(i);
                    foreach (var c in Comb(xs, r - 1))
                        yield return c.Before(x);

                    i++;
                }
            }

        }

        // 要素をシーケンスに追加するユーティリティ
        public static IEnumerable<T> Before<T>(this IEnumerable<T> items, T first)
        {
            yield return first;

            foreach (var i in items)
                yield return i;
        }
        public static IList<T> Swap<T>(this IList<T> ie, int indexA, int indexB)
        {
            var temp = ie[indexA];
            ie[indexA] = ie[indexB];
            ie[indexB] = temp;
            return ie;
        }
    }
    #endregion
}