optimizing
시간 제한2초메모리 제한1024 MB
n이 주어지면 연속된 합의 세제곱을 이어 붙인 문자열에서 n번째 자리의 숫자를 반환한다.
문제
Write a function optimizing:
- input parameter: an
int-type objectnsatisfyingn - return value: the
int-type objectf(n)wherefis the following Python function:
def f(n):
assert type(n)==int and n>=0
g=lambda n:sum([x**3 for x in range(n)])
x=""
k=0
while n>=len(x):
x+=str(g(k))
k+=1
return int(x[n])
예제
이 문제는 공개된 예제가 없습니다.