Problem:
 Score : 200 points    Problem Statement There is a kangaroo at coordinate 0 on an infinite number line that runs from left to right, at time 0 .
During the period between time i-1 and time i , the kangaroo can either stay at his position, or perform a jump of length exactly i to the left or to the right.
That is, if his coordinate at time i-1 is x , he can be at coordinate x-i , x or x+i at time i .
The kangaroo's nest is at coordinate X , and he wants to travel to coordinate X as fast as possible.
Find the earliest possible time to reach coordinate X .      Constraints  X is an integer.  1≤X≤10^9         Input The input is given from Standard Input in the following format:  X       Output Print the earliest possible time for the kangaroo to reach coordinate X .        Sample Input 1 6      Sample Output 1 3  The kangaroo can reach his nest at time 3 by jumping to the right three times, which is the earliest possible time.       Sample Input 2 2      Sample Output 2 2  He can reach his nest at time 2 by staying at his position during the first second, and jumping to the right at the next second.       Sample Input 3 11      Sample Output 3 5

Solution (Python):


def main():
    X = int(raw_input())
    step = 0
    for i in xrange(1,X+1):
        step += i
        if step >= X:
            break
    print i

if __name__ == '__main__':
    main()

Solution (Python):


x=int(raw_input())

i=0
while i*(i+1)/2<x:
 i+=1
print i

Solution (Python):
if __name__ == '__main__':
    x = abs(int(input()))

    s = 0
    for i in range(0,10 ** 9):
        if s >= x: 
            print(i - 1)
            break
        s += i

Solution (Python):
if __name__ == '__main__':
    x = abs(int(input()))

    s = 0
    for i in range(0,10 ** 9):
        if s > x: 
            print(i - 1)
            break
        elif s == x:
            print(i - 1)
            break
        s += i

Solution (Python):
import math
X = int(input())
n = int(math.sqrt(2*X) -2)

def sum(a):
    return a*(a+1)/2

result = 0

for i in range(n,X+1):
    if sum(i)>= X:
        result = i
        break

print(result)

Solution (Python):
X = int(input())

i = 1
sum = 0
while sum < X:
        sum += i
        i += 1
print(i - 1)

Solution (Python):
import sys

def solve():
    x = int(input())

    t = 1

    while calc_sum(t) < x:
        t += 1

    print(t)

def calc_sum(t):
    return t * (t + 1) // 2

def debug(x, table):
    for name, val in table.items():
        if x is val:
            print('DEBUG:{} -> {}'.format(name, val), file=sys.stderr)
            return None

if __name__ == '__main__':
    solve()

Solution (Python):


import math
x = int(input())
k = (math.sqrt(1 + 8 * x) - 1) / 2

print(int(math.ceil(k)))

Solution (Python):
x = int(input())
time = 0
step = 0
while step < x:
    time += 1
    step += time
print(time)

Solution (Python):
def f(n):
    return (n * (n + 1)) // 2


def main():
    inp = int(input())
    l, u = 0, 1000000
    while l < u:
        mid = (l + u) // 2
        if f(mid) >= inp:
            u = mid
        else:
            l = mid + 1
    print(u)


if __name__ == "__main__":
    main()

Solution (Python):
from math import sqrt, ceil

def quad_solve(X):
	return int(ceil((-1 + sqrt(1 + 8*X)) / 2))

X = int(raw_input())
i = 0
print quad_solve(X)

Solution (Python):
import math
n = int(input())
print(math.ceil((-1+(1+8*n)**(1/2))/2))

Solution (Python):
X = int(raw_input())

i = 0
x = 0
while x < X:
    i += 1
    x += i
print i

Solution (Python):
x = int(input())

lb = -1
ub = 1145141919
ans = 0

while ub - lb > 1:
    mid = (lb + ub) // 2
    s = mid * (mid + 1) // 2
    if s >= x:
        ub = mid
        ans = mid
    else:
        lb = mid

print(ub)

Solution (Python):

'''
def search(t, x, i):
    global X
    if x == X:
        return t
    elif x > X:
        ans1 = search(i, x, i+1)
        ans2 = search(i, x-i, i+1)
        return min(ans1, ans2)
    else:
        ans3 = search(i, x+i, i+1)
        return ans3
'''
X = int(input())
p, i = (0,0)
while True:
    p += i
    i += 1
    if p >= X:
        break
print(i-1)
'''
ans = search(0, 0, 1)
print(ans)
'''

Solution (Python):
x = input()
x = int(x)


def f(x):
    for n in range(0, x + 1):
        s = n * (n + 1) / 2
        if s >= x:
            return n


print(f(x))

Solution (Python):


X = int(raw_input())

a = 1
n = 1
while(n < 1000000000):
    a = n-1 + a
    if a > X:
        print n-1
        exit()
    elif a == X:
        print n
        exit()
    n+=1

Solution (Python):
X = input()

r = 0
i = 0
a = 0
prev = 0
while True:
    i += 1
    a += i
    if prev < X and X <= a:
        r = i
        break
    prev = a

print r

Solution (Python):
import math
x = int(input())

i = math.sqrt(2*x)
print(round(i))

Solution (Python):
X = int(input())

i=0
while(i*(i+1)<2*X):
 i+=1

print(i)

Solution (Python):




x =input()
sums=0
for i in range(44722):
    sums += i
    
    
    
    if sums < x:
        pass
    elif sums >= x:
        print i
        break

Solution (Python):
X = int(raw_input())
m=0
for i in xrange(1, X+1):
	m+=i
	if m >= X:
		print i
		break

Solution (Python):

x = int(input())
d,i = [0,0]

while True:
    d += i
    i += 1
    if x <= d:
        break
print(i-1)

Solution (Python):
def main():
    X = int(input())

    n = 1
    while True:
        if n * (n + 1) >= 2 * X:
            break
        else:
            n += 1
    print(n)

if __name__ == "__main__":
    main()

Solution (Python):
i = abs(int(raw_input()))
c = 0
while i > 0:
	c += 1
	i -= c
print c

Solution (Python):
X = int(input())
for i in range(X+1):
    if (i*(i+1)/2) >= X:
        time = i
        break
print(time)

Solution (Python):
X = int(input())
count = 0
sumnum = 0
X = abs(X)
while True:
    count += 1
    sumnum += count
    if sumnum >= X:
        break
print(count)

Solution (Python):
if __name__ == '__main__':
    x = int(input())

    total = i = 0
    while total < x:
        total += i
        i += 1

    print(i - 1)

Solution (Python):
x=int(input())
i=1
while(x>0):
	x=x-i
	if(x<=0):
		print(i)
	i=i+1

Solution (Python):
import sys

INF = 10**9+7

stdin = sys.stdin
def na(): return map(int, stdin.readline().split())
def nal(): return list(map(int, stdin.readline().split()))
def ns(): return stdin.readline().strip()
def nsl(): return list(stdin.readline().strip())
def ni(): return int(stdin.readline())

x = ni()

c = 1
ans = 1
while(True):
    if(x <= c):
        print(ans)
        break
    else:
        ans += 1
        c += ans

Solution (Python):
X = int(input())

x = 0
t = 0
i = 1
sum = 0
while(sum <= X):
	sum += i
	if(sum >= X):
		print(i)
		exit()
	i += 1

Solution (Python):
from math import sqrt, ceil
x = int(input().strip())
print(ceil(-0.5 + sqrt(1+8*x)/2))

Solution (Python):
def main():
    X = int(input())

    xi = 0
    t = 0
    for i in range(1, X + 1):
        xi += i
        t += 1
        if xi >= X:
            print(str(t))
            break

main()

Solution (Python):

X = input()
counter = 1
while(counter*(counter+1)/2<X):
    counter += 1

print(counter)

Solution (Python):
x = int(input())
x = 2*x

n = 0
while 1:
    if x <= n * n + n:
        print(n)
        break
    else:
        n += 1

Solution (Python):
X = int(input())
point = 0
time = 0

if X >= 0:
    while point < X:
        time += 1
        point += time
print(time)

Solution (Python):
import math
k = int(input())
n = (math.sqrt(1 + 8*k) - 1) * 0.5
N = math.ceil(n)
print(N)

Solution (Python):
N=int(input())
ans=int((1+(8*N-7)**0.5)/2)
print(ans)

Solution (Python):
X = int(input())

d = 0
i = 0

while(d < X):
    i += 1
    d += i

print(i)

Solution (Python):


X = int(input())

k = int((2 * X + 1 / 4)**(1 / 2) -1 / 2)
while (k * (k + 1)) // 2 < X:
	k = k + 1

print(k)

Solution (Python):
X = int(raw_input())

i = 1
res = 0
while True:
    res += i
    if res >= X:
        break
    i += 1
print i

Solution (Python):
X=int(input())
i=1
while 1:
    S = i*(i+1)/2
    if X<=S:
        break
    i+=1
print(i)

Solution (Python):
from numpy import sqrt,ceil
X = int(input())
print(int(ceil((sqrt(8 * X + 1) -1)/2)))

Solution (Python):
X = int(input())

i = 0
goukei = 0

while goukei < X:
    i = i + 1
    goukei = goukei + i

print(i)

Solution (Python):
X = int(input())

i = 0
while i * (i + 1) / 2 < X:
    i += 1

print(i)

Solution (Python):
X = int(input().strip())
 
t = 0
x = 0
if X == 0:
	print(0)
else:
	while(True):
		t += 1
		x += t
		if x >= X:
			print(t)
			break

Solution (Python):
import math
x = int(input())
print(int(round(math.sqrt(2*x))))

Solution (Python):
X = int(input())
count = 0
step = 0
while X > step:
    count += 1
    step += count
print(count)

Solution (Python):
import math
x = int(input())
print(math.ceil((-1+(1+8*x)**0.5)/2))