제출 #100875

#제출 시각아이디문제언어결과실행 시간메모리
100875cki86201홀-짝 수열 (IZhO11_oddeven)Cpython 3
100 / 100
33 ms3404 KiB
N = int(input())
l = 1
h = 10**100
r = -1
while l <= h:
	m = (l + h) // 2
	if m * (m-1) // 2 + 1 <= N:
		r = m
		l = m + 1
	else:
		h = m - 1
print(2*N-r)
#Verdict Execution timeMemoryGrader output
Fetching results...