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



Sample input:
3


Sample output:
1.000000000000

Submission status: Wrong Answer

Solution code:
L = int(input())

if L%3 == 0:
    print((L//3)**3)
else:
    mx = -1
    for i in range(1,L+1):
        for j in range(1,L+1):
            z = L - (i + j)
            if (z + i + j) == L:
                buf = z*i*j
                if buf > mx:
                    mx = buf
    print(mx)

Submission status: Wrong Answer

Solution code:
print(333*333*333)

Submission status: Wrong Answer

Solution code:
L = int(input())
ans = 0
for i in range(1, 1000):
    for j in range(1, L - i + 1):
        if L - i - j > 0:
            ans = max(ans, i * j * (L - i - j))
print(ans)

Submission status: Wrong Answer

Solution code:
l=int(input())
ans=0
for i in range(l):
    tmp=0
    for j in range(l-i):
        k=l-i-j
        tmp=i*j*k
        ans=max(ans,tmp)
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())

ans = 0

for i in range(1,n+1):
    for j in range(1,n+1-i):
        #print(i,j,n-i-j)
        ans=max(i*j*(n-i-j),ans)
print(ans)

Submission status: Wrong Answer

Solution code:


def main():
  
  l = int(input())
  
  v = 0
  for i in range(1,l-1):
    for j in range(1, l-i):
      k = l - i - j
      v = max(v, i*j*k)
  
  print(v)
		

if __name__=='__main__':
    main()

Submission status: Wrong Answer

Solution code:
import numpy as np
import fractions
import decimal
from collections import deque

n=int(input())
a=n//3+n%3
b=n//3
c=n//3
# print(a,b,c)
print(a*b*c)

Submission status: Wrong Answer

Solution code:
L = input()

x=0
for i in range(int(L)):
    if 3*x < int(L):
        x += 1
    else:
        break
print(x**3)

Submission status: Wrong Answer

Solution code:
l = int(input())

fans = 0

a = l // 3
bc = (l - a)
b = bc // 2
c = bc - b
fans = max(fans, a * b * c)


a = l // 3
if l % 3 != 0:
    a += 1
bc = (l - a)
b = bc // 2
c = bc - b
fans = max(fans, a * b * c)
print(float(fans))

Submission status: Wrong Answer

Solution code:
l=int(input())
a=l%3
if a==1:
    print((l//3)*(l//3)*(l//3+1))

elif a==2:
    print((l//3)*(l//3+1)*(l//3+1))

else :
    print((l//3)**3)

Submission status: Wrong Answer

Solution code:
L = int(input().split()[0])
max_a = -float("inf")
for x in range(L + 1):
    for y in range(L + 1):
        h = L - (x + y)
        if h > 0:
            max_a = max(max_a, x * y * h)
ans = max_a
print(ans)

Submission status: Wrong Answer

Solution code:
L = int(input())
if L%3==0:
    S = (L//3)**3
    print(S)
elif L%3==1:
    S = (L//3+1) * (L//3)**2
    print(S)
elif L%3==2:
    S = (L//3 + 1) * (L//3 +1) * (L//3)
    print(S)

Submission status: Wrong Answer

Solution code:
L=int(input())
l=L//3
print(l*l*(L-2*l))

Submission status: Wrong Answer

Solution code:
L=int(input())
ans=0
if L%3==0:
    print((L/3)**3)
else:
    print(((L-1)/2)**2)

Submission status: Wrong Answer

Solution code:
L=int(input())
print(L**3//27)

Submission status: Wrong Answer

Solution code:
# ANSHUL GAUTAM
# IIIT-D

from math import *
from copy import *
from string import *				# alpha = ascii_lowercase
from random import *				# l.sort(key=lambda l1:l1[0]-l1[1]) => ex: sort on the basis difference
from bisect import *				# bisect_left(arr,x,start,end)  => start and end parameters are temporary
from sys import stdin				# bisect_left return leftmost position where x should be inserted to keep sorted
from sys import maxsize
from operator import *				# d = sorted(d.items(), key=itemgetter(1))
from itertools import *
from collections import Counter		# d = dict(Counter(l))
from collections import defaultdict # d = defaultdict(list)

'''
3
'''

def solve(L):
	l = floor(L/3)
	w = floor((L - l)/2)
	h = L - w - l
	return l*w*h
	

L = int(stdin.readline())
ans = solve(L)
print("%.10f"%ans)

Submission status: Wrong Answer

Solution code:
L = int(input())
ans = 0
for x in range(1, 1000):
    for y in range(1, 1000):
        for z in range(1, L-x-y+1):
            ans = max(ans, x*y*z)
print(ans)

Submission status: Wrong Answer

Solution code:
l = int(input())
s = 0
for i in range(1,l+1):
	for j in range(i,l+1):
		k = l - (i+j)
		if k <= 0:
			continue
		s = max(s,i*j*k)
print (s)

Submission status: Wrong Answer

Solution code:
n=int(input())
if n%3==0:
    print((n//3)**3)
else:
    v=n-(n//3)*3
    a=(n//3)+v
    print(a*(n//3)*(n//3))

Submission status: Wrong Answer

Solution code:
L=int(input())

if L%3==0:
    print((L//3) ** 3)
elif L%3==1:
    print((L//3) ** 2 * (L//3+1))
else:
    print((L//3) * (L//3+1)**2)

Submission status: Wrong Answer

Solution code:
L = int(input())

max = 0
for a in range(L - 2 , 0, -1):
    for b in range(L - a, 0, -1):
        c = L - a - b
        if a * b * c > max:
            max = a * b * c
print(max)

Submission status: Wrong Answer

Solution code:
# Problem C - Maximum Volume

# input
L = int(input())

# initialization
max_cost = 0

# count
for x in range(1, 1000):
    for y in range(1, 1000):
        z = L - (x + y)
        if z<=0:
            continue
        max_cost = max(max_cost, x * y * z)

# output
print(max_cost)

Submission status: Wrong Answer

Solution code:
s = int(input())
a = s//3
b = (s-a)//2
print(a*b*(s-a-b))

Submission status: Wrong Answer

Solution code:
l=int(input())
a=l%3
if a==1:
    print((l//3)*(l//3)*((l+1)//3)*3)

elif a==2:
     print((l//3)*(l//3)*((l+2)//3)*3)

else :
    print((l//3)**3)

Submission status: Wrong Answer

Solution code:
n=int(input())
print(int(n/3)**3)

Submission status: Wrong Answer

Solution code:
l = int(input())

a = l // 3
b = (l - a) // 2
c = l - a - b

print(a * b * c)

Submission status: Wrong Answer

Solution code:
L = int(input())

ans = 0
for t in range(L+1):
    ans = max(ans,(L-t)/2 * (L-t)/2 * t)
print(ans)

Submission status: Wrong Answer

Solution code:
L = int(input())

ans = -1
for i in range(1, L):
    for j in range(1, L):
        if i + j > 999:
            break
        k = L - (i + j)
        ans = max(ans, i * j * k)
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
if n%3==0:
    print((n//3)**3)
else:
    v=n-(n//3)*3
    a=(n//3)+v
    print(v*(n//3)*(n//3))

Submission status: Wrong Answer

Solution code:
n = int(input())
if n % 3 == 2:
    print(n/3 * (n/3+1) * (n/3+1))
else:
    print(n/3 * n/3 * (n/3+n % 3))

Submission status: Wrong Answer

Solution code:
import sys
import math
import string
import fractions
import random
from operator import itemgetter
import itertools
from collections import deque
import copy
import heapq
from bisect import bisect, bisect_left, bisect_right

MOD = 10 ** 9 + 7
INF = float('inf')
input = lambda: sys.stdin.readline().strip()

sys.setrecursionlimit(10 ** 8)

L = int(input())
ans = 0
for b in range(1, L+1):
    for c in range(1, L+1):
        if b*c*(L-b-c) > ans:
            ans = b*c*(L-b-c)
print(ans)

Submission status: Wrong Answer

Solution code:
l = int(input())
ans = 0
for h in range(1,l-1):
    for w in range(1,l-h):
        ans = max(ans, h*w*(l-h-w))
print(ans)

Submission status: Wrong Answer

Solution code:
L = int(input())

ans = 0
for t in range(L):
    ans = max(ans,(L-t)/2 * (L-t)/2 * t)
print(ans)

Submission status: Wrong Answer

Solution code:
L = int(input())

if L % 3 == 0:
    K = L // 3
    print(K ** 3)

elif L % 3 == 1:
    K = L // 3
    print(K ** 2 * (K + 1))

else:
    K = L // 3
    print(K * (K + 1) ** 2)

Submission status: Wrong Answer

Solution code:
n = int(input())
if n % 3 == 2:
    print(n//3 * (n//3+1) * (n//3+1))
else:
    print(n//3 * n//3 * (n//3+n % 3))

Submission status: Wrong Answer

Solution code:
n  = [list(map(int, s.split())) for s in open(0)][0][0]

r = n % 3
c = n // 3
if r == 0:
    print(c ** 3)
elif r == 1:
    print((c**2)*(c + 1))
else:
    print(c*(c + 1)*(c + 1))

Submission status: Wrong Answer

Solution code:
l = int(input())

if (l % 3 == 0):
    print((l / 3) ** 3)
elif (l % 3 == 1):
    print((l//3+1)*(l//3)**2)
else:
    print((l//3)*(l//3+1)**2)

Submission status: Wrong Answer

Solution code:
l=int(input())
s=l//3
a=l%3
x=s
y=s
z=s
if a==1:
  x=s
  y=s
  z=s+1
elif a==2:
  x=s
  y=s+1
  z=s+1
print(x*y*z)

Submission status: Wrong Answer

Solution code:
l = int(input())

ans = 0
for i in range(l):
    for j in range(l - i):
        volume = i * j * (l - i - j)
        ans = max(ans, volume)

print(ans)

Submission status: Wrong Answer

Solution code:
from sys import stdin
def main():
    readline=stdin.readline
    L=int(readline())
    print((L//3)**3)
if __name__=="__main__":
    main()

Submission status: Wrong Answer

Solution code:
l = int(input())
v = 0
for i in range(1, l+1):
    for j in range(1, l+1):
        k = l - i - j
        v = max(v, i*j*k)
print(v)

Submission status: Wrong Answer

Solution code:
l = int(input())

print((l // 3) ** 2 * (l - 2 * (l // 3)))

Submission status: Wrong Answer

Solution code:
import sys


def input():
    return sys.stdin.readline()[:-1]

L = int(input())
ans = 0
for i in range(L):
    for j in range(L):
        if (L-i-j>0):
            ans = max(ans, i*j*(L-i-j))
print(ans)

Submission status: Wrong Answer

Solution code:
L = int(input())
ans = 0
for i in range(1, L-1):
    for j in range(1, L-i):
        ans = max(ans, i*j*(L-i-j))
print(ans)

Submission status: Wrong Answer

Solution code:
from sys import stdin
L = int(stdin.readline().rstrip())
ans = L-2
for x in range(L):
    x += 1
    for y in range(L):
        y += 1
        v= x*y*(L-x-y)
        ans = max(ans, v)

print(ans)

Submission status: Wrong Answer

Solution code:
L = int(input())
res = 0
for y in range(L):
  for z in range(L):
   	res = max(res,(L-y-z)*y*z)
print(res)

Submission status: Wrong Answer

Solution code:
L = int(input())
ans = 0
for i in range(1,L):
    for j in range(1,L-i):
        ans = max(ans,i*j*(L-i-j))
print(ans)

Submission status: Wrong Answer

Solution code:
L = int(input())
ans = 0
for x in range(1, L-1):
    for y in range(1, L-1):
        ans = max(x*y*(L-x-y), ans)
print(ans)

Submission status: Wrong Answer

Solution code:
l=int(input())
ans=0
for i in range(1,l-1):
    for j in range(1,l-i):
        temp=i*j*(l-i-j)
        if ans<temp:
            ans=temp

print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
re=n%3
a=n/3
b=0
c=0
if re==1:
    b=a+1 
    c=a 
if re==2:
    b=a+1 
    c=a+1 
if re==0:
    b=a 
    c=a 
print(a*b*c)

Submission status: Wrong Answer

Solution code:
# ABC159_C
l=int(input())
ans=0
for x in range(1,1001):
    for y in range(1,1001):
        z=l-x-y
        if z>0:
            v=x*y*z
            ans=max(v,ans)
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
s=n//3
if n%3==1:print(s*(s+0.5)**2)
elif n%3==2:print(max(s*(s+1)*(s+1),s*(s+2)*s))
else:print(s**3)

Submission status: Wrong Answer

Solution code:
L = int(input())
t = 0
x, y, z = L//3, L//3, L//3
if L%3 == 0:
    print(x*y*z)
elif L%3 == 1:
    print(x*(y+1)*z)
else:
    print(max(x*(y+1)*(z+1),x*(y+2)*z))

Submission status: Wrong Answer

Solution code:
l = int(input())
ans = 0
for i in range(l+1):
    for j in range(l-i+1):
        k = l-i-j
        ans = max(ans,i*j*k)
print(ans)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10000000)
INF = 1<<32


def solve(L: int):
    ans = 0
    for i in range(L):
        for j in range(L):
            k = L-i-j
            if k > 0:
                ans = max(ans, i*j*k)
    print(ans)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    L = int(next(tokens))  # type: int
    solve(L)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
l = int(input())

print((l // 3) ** 3)

Submission status: Wrong Answer

Solution code:
L = int(input())

ans = 0
for A in range(1,L):
  V_max = (A*(L-A)*(L-A))/4
  ans = max(ans,V_max)
print(ans)

Submission status: Wrong Answer

Solution code:
def maxvolume (s): 
    maxvalue = 0
    i = 1
    for i in range(s - 1): 
        j = 1
        for j in range(s): 
            k = s - i - j 
            maxvalue = max(maxvalue, i * j * k) 
    return maxvalue 
      
s = int(input())
print(maxvolume(s))

Submission status: Wrong Answer

Solution code:
l=int(input())
a=l//3
b=l-a*2
print(a*a*b)

Submission status: Wrong Answer

Solution code:
import sys
rl = sys.stdin.readline


def solve():
    L = int(input())
    print((L // 3) ** 3)


if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

Solution code:
l = int(input())

res = 0
for i in range(1,l):
    for j in range(1,l):
        k = l-i-j
        if k>0:
            res = max(res,i*j*k)
print(res)

Submission status: Wrong Answer

Solution code:
L = int(input())
ans = 0
for i in range(1,L+1):
    for j in range(1,L-i+1):
        ans = max(ans,i*j*(L-i-j))
print(ans)

Submission status: Wrong Answer

Solution code:
L = int(input())
ans = 0
for w in range(L):
    for d in range(L-w):
        h = L-w-d
        V = h*w*d
        ans = max(ans,V)
print(ans)

Submission status: Wrong Answer

Solution code:
def main():
  S=input()

  N=len(S)
  s=S
  for i in range(len(s)//2):
    if s[i]!=s[len(s)-i-1]:
      print('No')
      return
  s=S[:(N-1)//2]
  for i in range(len(s)//2):
    if s[i]!=s[len(s)-i-1]:
      print('No')
      return
  s=S[(N+3)//2-1:]
  for i in range(len(s)//2):
    if s[i]!=s[len(s)-i-1]:
      print('No')
      return
  print('Yes')
  
main()

Submission status: Wrong Answer

Solution code:
l = int(input())

ans = 0
for i in range(1, 999):
    for j in range(1, 999):
        k = l - i - j
        if 1 <= k <= 1000:
            ans = max(ans, i*j*k)

print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
s=n//3
if n%3==1:print(s*s*(s+1))
elif n%3==2:print(s*(s+1)*(s+1))
else:print(s**3)

Submission status: Wrong Answer

Solution code:
s = input()

def is_kaibun(kaibun):
    for i in range(len(kaibun)//2):
        if kaibun[i] != kaibun[-i-1]:
            return False
    return True

n = len(s)

ss = (n-1) // 2

first = s[:ss]
second = s[(ss+1):]


if(is_kaibun(first) and is_kaibun(second)):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

l = ii()
print((l//3)**3)

Submission status: Wrong Answer

Solution code:
L = int(input())

q, mod = divmod(L, 3)

if mod == 0:
    ans = q**3
elif mod == 1:
    ans = q * q * (q + 1)
elif mod == 2:
    ans = q * (q + 1) * (q + 1)

print(ans)

Submission status: Wrong Answer

Solution code:
L = int(input())
ans = 0
for i in range(L):
    for j in range(L):
        if i + j <= L:
            ans = max(ans, i * j * (L - i - j))
print(ans)

Submission status: Wrong Answer

Solution code:
L = int(input())

ans = 0

for i in range(1,L-1):
    for j in range(1,L-i):
        ans = max(ans, i * j * (L - i - j))

print(ans)

Submission status: Wrong Answer

Solution code:
L = int(input())
h = L//3
w = L//3+(1 if L%3 > 1 else 0)
t = L//3+(1 if L%3 > 0 else 0)
print(h*w*t)

Submission status: Wrong Answer

Solution code:
n = int(input())
t = 0
for i in range(1, n+1):
    for j in range(1, i+1):
        t = max(t, i * j * (n - i - j))
print(t)

Submission status: Wrong Answer

Solution code:
# Python3 code to Maximize volume of  
# cuboid with given sum of sides 
  
# Return the maximum volume. 
def maxvolume (s): 
    maxvalue = 0
  
    # for length 
    i = 1
    for i in range(s - 1): 
        j = 1
          
        # for breadth 
        for j in range(s): 
              
            # for height 
            k = s - i - j

Submission status: Wrong Answer

Solution code:
L = int(input())

ans = 0
for x in range(L):
    for y in range(L):
        z = L - (x+y)
        if z > 0:
            ans = max(ans,x*y*z)
print(ans)

Submission status: Wrong Answer

Solution code:
L = int(input())

res = 0
for a in range(1, L + 1):
    for b in range(1, L + 1):
        c = L - (a + b)
        if c <= 0:
            continue
        res = max(res, a * b * c)
print(res)

Submission status: Wrong Answer

Solution code:
def main():
    L = float(input())
    ans = L**3 // 27
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
L = int(input())
if L % 3 == 0:
    print( (L //3) ** 3)
elif L == 1:
    print(0.33 * 0.33 * 0.34)
elif L == 2:
    print(0.66 * 0.66 * 0.67)
elif L% 3 == 1:
    a = (L - 1)//3
    print(a * a * (a + 1))
elif L% 3 == 2:
    a = (L - 2)//3
    print(a *  (a + 1) * (a + 1))

Submission status: Wrong Answer

Solution code:
l = int(input())
ans = 0
for i in range(1, l):
  for j in range(i, l-i):
    ans = max(ans, i*j*(l-i-j))

    #print(i, j, l-i-j)
print(ans)

Submission status: Wrong Answer

Solution code:
L = int(input().split()[0])
max_a = -float("inf")
for x in range(L - 1):
    for y in range(L - 1):
        h = L - (x + y)
        max_a = max(max_a, x * y * h)
ans = max_a
print(ans)

Submission status: Wrong Answer

Solution code:
l = int(input())

res = 0
for i in range(1, l):
    for j in range(i, l):
        if l > i+j:
            k = l - (i+j)
            res = max(res, k*i*j)
print(res)

Submission status: Wrong Answer

Solution code:
l = int(input())
s = l // 3
print(s ** 3)

Submission status: Wrong Answer

Solution code:
n = int(input())

if n % 3 == 0:
    print((n//3)**3)
else:
    a = n//3
    b = n//3
    c = n - a - b
    print(a * b * c)

Submission status: Wrong Answer

Solution code:
n = int(input())
print(pow(n, 3)//27)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 0
for i in range(n):
    for j in range(n):
        if i+j > n:
            pass
        else:
            ans = max(ans,i*j*(n-i-j))
print(ans)

Submission status: Wrong Answer

Solution code:
l = int(input())

ans=-1
for i in range(1,l):
    for j in range(1,l):
        k = l-(i+j)
        if k<=0:
            continue
        ans=max(ans,i*j*k)
print(ans)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def LS(): return list(map(list, input().split()))
def S(): return list(input().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#solve
def solve():
    l = II()
    ans = 0
    for z in range(1, l):
        for y in range(1, l):
            x = l - z - y
            if x > 0:
                ans = max(ans, x * y * z)
    print(ans)
    return


#main
if __name__ == '__main__':
    solve()

Submission status: Time Limit Exceeded

Solution code:
L = int(input())
ans = [0]
for i in range(1, 350):
    for j in range(1, 350):
        for k in range(1, 350):
            if i + j + k == L:
                ans.append(i*j*k)
print(max(ans))

Submission status: Time Limit Exceeded

Solution code:
L = int(input())
V = [0]*10**7
for x in range(1,10**7):
    V[x] = (x*0.0001)**2 *(L-2*(x*0.0001))
print(max(V))

Submission status: Time Limit Exceeded

Solution code:
import sys
import numpy as np
# input処理を高速化する
input = sys.stdin.readline

L=int(input())
div =0.001
ranges =np.arange(0.001,L+1,0.001)

V=0
for x in ranges:
    z=L-2*x
    V=max(V,x*x*z)

print(V)


# for x in np.arange(1,10+1,0.1):
#     for y in np.arange(1,10+1-x,0.1):
#         print(x,y)

Submission status: Time Limit Exceeded

Solution code:
import sys
import numpy as np
# input処理を高速化する
input = sys.stdin.readline

L=int(input())
div =0.001
V=0
for x in np.arange(div,L+1,div):
    z=L-2*x
    V=max(V,x*x*z)

print(V)


# for x in np.arange(1,10+1,0.1):
#     for y in np.arange(1,10+1-x,0.1):
#         print(x,y)

Submission status: Time Limit Exceeded

Solution code:
import sys
import numpy as np
# input処理を高速化する
input = sys.stdin.readline

L=int(input())
div =0.001
V=0
for x in np.arange(div,L+1,div):
    y=x
    z=L-x-y
    V=max(V,x*y*z)

print(V)


# for x in np.arange(1,10+1,0.1):
#     for y in np.arange(1,10+1-x,0.1):
#         print(x,y)

Submission status: Time Limit Exceeded

Solution code:
def main():
    L = int(input())
    l = L
    ans = 0
    m = L * 10 ** 3
    for i in range(1, m):
        for j in range(1, m):
            w = m - i - j
            t = i/ 10 ** 3 * j/ 10 ** 3 * w/ 10 ** 3
            if w < 0:
                break
            ans = ans if ans > t else t
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

Solution code:
L = int(input())

import random

vol_max = 0

for i in range(100000000):
    a = random.uniform(0, L)
    b = random.uniform(0, L-a)
    c= L-a-b
    vol = a*b*c
    if vol_max < vol: vol_max = vol
    else: continue
        
print(vol_max)

Submission status: Time Limit Exceeded

Solution code:
L=int(input())
ans=0
tmp=0
#分割数
d=300
l=5
L_=int(L**(1/3))
for i in range(max(0,int(L_-l)*d),int(L_+l)*d):
  for j in range(max(0,int(L_-l)*d-i),int(L_+l)*d-i):
    tmp=(i/d)*(j/d)*(L-(i/d)-(j/d))
    ans=max(ans,tmp,0)
print(ans)

Submission status: Time Limit Exceeded

Solution code:
L=int(input())
ans=0
tmp=0
#分割数
d=1000
l=5
L_=int(L**(1/3))
for i in range(max(0,int(L_-l)*d),int(L_+l)*d):
  for j in range(max(0,int(L_-l)*d-i),int(L_+l)*d-i):
    tmp=(i/d)*(j/d)*(L-(i/d)-(j/d))
    ans=max(ans,tmp,0)
print(ans)

Submission status: Time Limit Exceeded

Solution code:
L=float(input())
max=float(0)
def drange(begin, end, step):
    n = begin
    while n+step < end:
     yield n
     n += step
for x in drange(2*L/3,L,0.0001):
    for y in drange(0,L-x,0.0001):
        z=L-x-y
        A=x*y*z
        if A>max:
            max=A
print(max)

Submission status: Time Limit Exceeded

Solution code:
L=float(input())
max=float(0)
def drange(begin, end, step):
    n = begin
    while n+step < end:
     yield n
     n += step
for x in drange(2*L/3,L,0.00001):
    for y in drange(0,L-x,0.00001):
        z=L-x-y
        A=x*y*z
        if A>max:
            max=A
print(max)

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-
import sys
import itertools#これは色々使える組み込み関数みたいなやつ
#import math#数学的計算はこれでいける。普通に0.5乗しても計算可能
#w=input()
from operator import itemgetter
from sys import stdin
#input = sys.stdin.readline#こっちの方が入力が早いが使える時に使っていこう

N=3
M=3
i=0
j=0
k=0
x=0
y=0
z=0
xy=0
V=0
c=[]
number_list=list(map(int, input().split(" ")))
L=number_list[0]
#M=number_list[1]
#print(L)
z=0.25*L
z1=0.75*L
for i in range(10**13):
    z += i*(10**(-13))*L
    if z>z1:
        break
    #print(z)
    V1=((L-z)**2)/4*z
    c.append(float(V1))
    #if V1 >= V:
    #    V=V1
#print(V1)
print(max(c))

#N=int(input())
#A=int(input())
#B=int(input())
#print(N)
"1行1つの整数を入力を取得し、整数と取得する"


#number_list=list(map(int, input().split(" ")))#数字の時
#print(number_list)
"12 21 332 とか入力する時に使う"
"1行に複数の整数の入力を取得し、整数として扱う"

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
#メモ
for i in number_list:#こっちの方がrage使うより早いらしい
    print(number_list[i-1])

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

'''
x=[]
y=[]
for i in range(N):
    x1, y1=[int(i) for i in input().split()]
    x.append(x1)
    y.append(y1)
print(x)
print(y)
"複数行に2数値を入力する形式 x座標とy座標を入力するイメージ"
'''

'''
mixlist=[]
for i in range(N):
    a,b=input().split()
    mixlist.append((int(a),b))
print(mixlist)
"複数行にintとstrを複合して入力するやつ，今回はリスト一つで処理している"
'''

'''
#array=[input().split()for i in range(N)]
#print(type(array[0][0]))
#print(array)
"正方行列にstr型の値を入力"
'''

#brray=[list(map(int, input().split(" ")))for i in range(N)]
#print(type(brray[0][0]))
#print(brray)
'''
入力
1 2
4 5
7 8
出力結果
[[1, 2], [4, 5], [7, 8]]
'''
"列数に関して自由度の高いint型の値を入力するタイプの行列"
#以下に別解を記載
#N, M = [int(i) for i in input().split()]
'''
table = [[int(i) for i in input().split()] for m in range(m)]

print(type(N))
print(N)
print(type(M))
print(M)

print(type(table))
print(table)
'''




#s=input()
#a=[int(i) for i in s]
#print(a[0])
#print([a])
#単数値．桁ごとに分割したい．入力と出力は以下の通り
#イメージとして1桁ごとにリストに値を入れているかんじ

'''
入力
1234
出力
1
[[1, 2, 3, 4]]
'''




'''
word_list= input().split(" ")
print(word_list[0])
"連続文字列の入力"
"qw er ty とかの入力に使う"
"入力すると空白で区切ったところでlistの番号が与えられる"
'''



'''
A, B, C=stdin.readline().rstrip().split()#何個でもいけることが多い
print(A)
"リストではなく独立したstr型を入れるなら以下のやり方でOK"
'''


#a= stdin.readline().rstrip()
#print(a.upper())
"aという変数に入っているものを大文字にして出力"




#なんかうまく入力されるけど
#a=[[int(i) for i in 1.strip()]for 1 in sys.stdin]
#a = [[int(c) for c in l.strip()] for l in sys.stdin]]
#print(a)
#複数行の数値を入力して正方行列を作成

Submission status: Time Limit Exceeded

Solution code:
L=float(input())
max=float(0)
def drange(begin, end, step):
    n = begin
    while n+step < end:
     yield n
     n += step
for x in drange(0.001,L,0.001):
    for y in drange(0.001,L-x,0.001):
        z=L-x-y
        A=x*y*z
        if A>max:
            max=A
print(max)

Submission status: Time Limit Exceeded

Solution code:
L=float(input())
max=float(0)
def drange(begin, end, step):
    n = begin
    while n+step < end:
     yield n
     n += step
for x in drange(0.00001,L,0.00001):
    for y in drange(0.00001,L-x,0.00001):
        z=L-x-y
        A=x*y*z
        if A>max:
            max=A
print(max)

Submission status: Time Limit Exceeded

Solution code:
L=float(input())
max=float(0)
def drange(begin, end, step):
    n = begin
    while n+step < end:
     yield n
     n += step
for x in drange(0.000001,L,0.000001):
    for y in drange(0.000001,L-x,0.000001):
        z=L-x-y
        A=x*y*z
        if A>max:
            max=A
print(max)

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-

from decimal import *
import numpy as np


getcontext().prec = 2

L = int(input())
L = Decimal(L)

x=y=z=0
x = Decimal(x)
y = Decimal(y)
z = Decimal(z)


p = 0.01
p = Decimal(p)

for x in np.arange(p,L+1,p):
    for y in np.arange(p,L+1,p):
        z = L-(x+y)
        V = x*y*z
        
        if x*y*z < V:
            V = x*y*z


print(V)

Submission status: Time Limit Exceeded

Solution code:
L =int(input())

if L == 1:
    print('0.037036926')
elif L==2:
     print('0.296296074')
else:
    ans =0
    for i in range(2000):
        for j in range(2000):
            ans =max(ans, i/2*j/2*(L-(i/2+j/2)))
    print(ans)

Submission status: Time Limit Exceeded

Solution code:
L =int(input())

if L == 1:
    print('0.037036926')
elif L==2:
     print('0.296296074')
else:
    ans =0
    for i in range(5000):
        for j in range(5000):
            ans =max(ans, i/5*j/5*(L-(i/5+j/5)))
    print(ans)

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-

from decimal import *
import numpy as np


getcontext().prec = 2

L = int(input())
L = Decimal(L)

x=y=z=0
x = Decimal(x)
y = Decimal(y)
z = Decimal(z)


p = 0.01
p = Decimal(p)

maxV = 0

for x in np.arange(p,L+1,p):
    for y in np.arange(p,L+1,p):
        z = L-(x+y)

        V = x*y*z
    
        if maxV < V:
            maxV = V


print(maxV)

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-

from decimal import *
import numpy as np


getcontext().prec = 4

L = int(input())
L = Decimal(L)

x=y=z=0
x = Decimal(x)
y = Decimal(y)
z = Decimal(z)


p = 0.01
p = Decimal(p)

maxV = 0

for x in np.arange(p,L+1,p):
    for y in np.arange(p,L+1,p):
        z = L-(x+y)

        V = x*y*z
    
        if maxV < V:
            maxV = V


print(maxV)

Submission status: Time Limit Exceeded

Solution code:
import decimal

def volume(h, w, v):
    return h * w * v

L = decimal.Decimal(input())

max_volume = 0
max_list = []
i = decimal.Decimal(L/3) - 1
if i < 0:
    i = decimal.Decimal(0.01)

while i < L/3+1:
    j = decimal.Decimal(L/3) - 1
    if j < 0:
        j = decimal.Decimal(0.01)
    while j < L/3 + 1:
        k = decimal.Decimal(L - i - j)
        v = volume(i, j, k)
        if max_volume < v:
            max_volume = v
            max_list = [i, j, k]
        j += decimal.Decimal(0.01)
    i += decimal.Decimal(0.01)

print(max_volume)

Submission status: Time Limit Exceeded

Solution code:
L=int(input())
ans=0
tmp=0
d=3
for i in range(L*d):
  for j in range(L*d-i):
    tmp=(i/d)*(j/d)*(L-(i/d)-(j/d))
    ans=max(ans,tmp,0)
print(ans)

Submission status: Time Limit Exceeded

Solution code:
l = int(input())
a = 0
i = 0

while i < l/2:
    #print(i, i*((l-i)/2)*((l-i)/2))
    a = i*((l-i)/2)*((l-i)/2) if a < i*((l-i)/2)*((l-i)/2) else a
    i += 0.0001

print(float(a))

Submission status: Time Limit Exceeded

Solution code:
L = int(input())
if L % 3 == 0:
  b = [i + 1 for i in range(L)]
  k = [(i * (L - i) * (L - i)) / 4 for i in b]
  print(max(k))
else: 
  import numpy as np
  b = np.arange(0.1, L+0.001, 0.001)
  k = [(i * (L - i) * (L - i)) / 4 for i in b]
  print(max(k))

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-

from decimal import *
import numpy as np


getcontext().prec = 6

L = int(input())
L = Decimal(L)

x=y=z=0
x = Decimal(x)
y = Decimal(y)
z = Decimal(z)


p = 0.01
p = Decimal(p)

maxV = 0

for x in np.arange(p,L+1,p):
    for y in np.arange(p,L+1,p):
        z = L-(x+y)

        V = x*y*z
    
        if maxV < V:
            maxV = V


print(maxV)

Submission status: Time Limit Exceeded

Solution code:
sum = int(input())
max = 0
for i in range(sum*1000):
    a = i/1000
    for j in range(i):
        b = j/1000
        c = sum - a - b
        if a*b*c>max:
            max = a*b*c
print(max)

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time, copy,bisect
from operator import itemgetter
#from heapq import heappush, heappop
#import numpy as np
#from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson
#from scipy.sparse import csr_matrix
#from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

stdin = sys.stdin

ni = lambda: int(ns())
nf = lambda: float(ns())
na = lambda: list(map(int, stdin.readline().split()))
nb = lambda: list(map(float, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

L = ni()
print((L/3)**3)

Submission status: Accepted

Solution code:
L=float(input())

print((L/3)**3)

Submission status: Accepted

Solution code:
print((int(input())/3)**3)

Submission status: Accepted

Solution code:
L = int(input())
print((L / 3) ** 3)