Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
L = [0] + list(map(int, input().split())) + [0]
edge = []
distance = 0
for i in range(N+1):
    distance += abs(L[i] - L[i+1])
for i in range(1,N+1):
    if (L[i] -L[i-1])*(L[i+1] - L[i] )>=0:
        pass
    else:
        edge.append(i)
for i in range(1,N+1):
    if i in edge:
        print(distance-2*min(abs(L[i]-L[i+1]),abs(L[i]-L[i-1])))
    else:
        print(distance)

Fixed submission:
N = int(input())
L =[0]+ list(map(int,input().split()))+[0]
dis = 0
for i in range(N+1):
    dis += abs(L[i] - L[i+1])
#print(L,dis)
for i in range(1,N+1):
    print(dis + abs(L[i-1]-L[i+1]) - abs(L[i-1]-L[i]) - abs(L[i]-L[i+1]))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
L = [0] + list(map(int, input().split())) + [0]
edge = []
distance = 0
for i in range(N+1):
    distance += abs(L[i] - L[i+1])
for i in range(1,N+1):
    if (L[i] -L[i-1])*(L[i+1] - L[i] )>=0:
        pass
    else:
        edge.append(i)
for i in range(N+1):
    if i in edge:
        print(distance-2*min(abs(L[i]-L[i+1]),abs(L[i]-L[i-1])))
    else:
        if i == 0:
            pass
        else:
            print(distance)

Fixed submission:
N = int(input())
L =[0]+ list(map(int,input().split()))+[0]
dis = 0
for i in range(N+1):
    dis += abs(L[i] - L[i+1])
#print(L,dis)
for i in range(1,N+1):
    print(dis + abs(L[i-1]-L[i+1]) - abs(L[i-1]-L[i]) - abs(L[i]-L[i+1]))
Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = int(input())
X = int(input())
ans = 0
for i in range(A+1):
  for j in range(B+1):
    for k in range(C+1):
      if 50*i + 100*j = 500*k == X:
        ans += 1
print(ans)

Fixed submission:
A = int(input())
B = int(input())
C = int(input())
X = int(input())
ans = 0
for i in range(A+1):
  for j in range(B+1):
    for k in range(C+1):
      if 500*i + 100*j + 50*k == X:
        ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
N, H = map(int,input().split())
L = []
maxi = 0
for _ in range(N):
    a,b = map(int,input().split())
    maxi = max(maxi, a)
    L.append(b)
from itertools import accumulate
accumulated =  list(accumulate(\
    sorted([x for x in L if x > maxi],reverse=True) ))
from bisect import bisect_left
from math import ceil
if H - accumulated[-1]  > 0 :
    print(ceil((H - accumulated[-1]) / maxi) + len(accumulated))
else:
    index = bisect_left(accumulated,H)
    print(index + 1)
    


Fixed submission:
N, H = map(int,input().split())
L = []
maxi = 0
for _ in range(N):
    a,b = map(int,input().split())
    maxi = max(maxi, a)
    L.append((a,b))
cand = []
throw = 0
cnt = 0
for l in L:
    if maxi <  l[1]:
        throw += l[1]
        cand.append(l[1])
        cnt += 1
import math
if H - throw > 0: 
    print(math.ceil((H - throw)/maxi) + cnt )
else:
    throw = 0
    cnt = 0
    cand.sort()
    for x in cand[::-1]:
        throw += x
        cnt += 1
        if throw >= H:
            print(cnt)
            quit()

Buggy python submission (verdict: Runtime Error):
N, H = map(int,input().split())
L = []
maxi = 0
for _ in range(N):
    a,b = map(int,input().split())
    maxi = max(maxi, a)
    L.append(b)
from itertools import accumulate
accumulated =  list(accumulate(\
    sorted([x for x in L if x > maxi],reverse=True) ))
from bisect import bisect_right
from math import ceil
if H - accumulated[-1]  > 0 :
    print(ceil((H - accumulated[-1]) / maxi) + len(accumulated))
else:
    index = bisect_right(accumulated,H)
    print(index)
    


Fixed submission:
N, H = map(int,input().split())
L = []
maxi = 0
for _ in range(N):
    a,b = map(int,input().split())
    maxi = max(maxi, a)
    L.append((a,b))
cand = []
throw = 0
cnt = 0
for l in L:
    if maxi <  l[1]:
        throw += l[1]
        cand.append(l[1])
        cnt += 1
import math
if H - throw > 0: 
    print(math.ceil((H - throw)/maxi) + cnt )
else:
    throw = 0
    cnt = 0
    cand.sort()
    for x in cand[::-1]:
        throw += x
        cnt += 1
        if throw >= H:
            print(cnt)
            quit()
Buggy python submission (verdict: Runtime Error):
I = int(intput())
print(24+24-I)

Fixed submission:
I = int(input())
print(24+24-I)
Buggy python submission (verdict: Runtime Error):
N = input()
ans = 0
for x in N:
  if x == '1'
    ans += 1
  else:
    pass
print(ans)

Fixed submission:
N = input()
ans = 0
for x in N:
  if x == '1':
    ans += 1
  else:
    pass
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N = int()
ans = 0
val = 0
L = list(map(int, input().split()))
while val==0:
  for i in range(N):
    if L[i] % 2 == 0:
      L[i] = L[i] /2
    else:
      val = 1
  ans += 1
print(ans)


Fixed submission:
N = int(input())
L = list(map(int, input().split()))
v = 0
cnt = 0
while v == 0:
    cnt += 1
    for i in range(N):
        if L[i] % 2 == 0:
            L[i] = L[i] // 2
        else:
            v += 1
print(cnt-1)

Buggy python submission (verdict: Time Limit Exceeded):
N = int()
ans = 0
L = list(map(int, input().split()))
while True:
  for i in range(N):
    if L[i] % 2 == 0:
      L[i] = L[i] /2
    else:
      break
  ans += 1
print(ans)


Fixed submission:
N = int(input())
L = list(map(int, input().split()))
v = 0
cnt = 0
while v == 0:
    cnt += 1
    for i in range(N):
        if L[i] % 2 == 0:
            L[i] = L[i] // 2
        else:
            v += 1
print(cnt-1)

Buggy python submission (verdict: Time Limit Exceeded):
N = int()
ans = 0
L = list(map(int, input().split()))
while True:
  for i in range(N):
    if L[i] % 2 == 0:
      L[i] //= 2
    else:
      break
  ans += 1
print(ans)

Fixed submission:
N = int(input())
L = list(map(int, input().split()))
v = 0
cnt = 0
while v == 0:
    cnt += 1
    for i in range(N):
        if L[i] % 2 == 0:
            L[i] = L[i] // 2
        else:
            v += 1
print(cnt-1)
Buggy python submission (verdict: Runtime Error):
N, Z, W = map(int,input().split())
A = list(map(int,input().split()))
idea = abs(A[-1] - W)
idea2 = abs(A[-2] - A[-1])
print(max(idea,idea2))


Fixed submission:
N, Z, W = map(int,input().split())
A = list(map(int,input().split()))
idea = abs(A[-1] - W)
try: idea2 = abs(A[-2] - A[-1])
except:
    print(idea)
    quit()
print(max(idea,idea2))
Buggy python submission (verdict: Runtime Error):
def bisect_left(array, i, left, right):
    n = right - left + 1
    mid = (left+right) // 2
    if n == 1:
        if array[mid] < i:
            return 1
        else:
            return 0
    if i <= array[mid]:
        return bisect_left(array,i,left,mid)
    else:
        return (mid-left+1) + bisect_left(array,i,mid+1,right)

def bisect_right(array, i, left, right):
    n = right - left + 1
    mid = (right+left) // 2
    if n == 1:
        if i < array[mid] :
            return 0
        else:
            return 1
    if array[mid] <= i:
        return  (mid-left+1) + bisect_right(array,i,mid+1,right)
    else:
        return bisect_right(array,i,left,mid)

N = int(input())
L = []
for _ in range(3):
    l = list(map(int,input().split()))
    L.append(sorted(l))
ans = 0
for x in L[1]:
    n = bisect_left(L[0],x,0,N-1)
    m = bisect_right(L[2],x,0,N-1)
    m = N - m
    ans += n*m
print(ans)

Fixed submission:
s1=input()
s2=input()
if s1[0] == s2[2] and s1[1]==s2[1] and s1[2]==s2[0]:
  print("YES")
else:
  print("NO")

Buggy python submission (verdict: Runtime Error):
s1=input()
s2=input()
if s1[0] == s2[2] and s1[1]==s2[1] and s1[2]==s[0]:
  print("Yes")
else:
  print("No")

Fixed submission:
s1=input()
s2=input()
if s1[0] == s2[2] and s1[1]==s2[1] and s1[2]==s2[0]:
  print("YES")
else:
  print("NO")

Buggy python submission (verdict: Runtime Error):
s1=input()
s2=input()
if s1[0] == s2[2] and s1[1]==s2[1] and s1[2]==s[1]:
  print("Yes")
else:
  print("No")

Fixed submission:
s1=input()
s2=input()
if s1[0] == s2[2] and s1[1]==s2[1] and s1[2]==s2[0]:
  print("YES")
else:
  print("NO")

Buggy python submission (verdict: Runtime Error):
s1=input()
s2=input()
if s1[0] == s2[2] and s1[1]==s2[1] ans s1[2]==s[1]:
  print("Yes")
else:
  print("No")

Fixed submission:
s1=input()
s2=input()
if s1[0] == s2[2] and s1[1]==s2[1] and s1[2]==s2[0]:
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
path = [[] for _ in range(N)]
save = []
for _ in range(M):
    a,b = map(int,input().split())
    save.append([a-1,b-1])
    path[b-1].append(a-1)
    path[a-1].append(b-1)


def dfs(now):
    if not 0 in vis: 
        cnt += 1
        return None
    for new in path[now]:
        if vis[new] == 0:
            vis[new] = 1
            dfs(new)
cnt = 0
for i in range(M):
    vis  = [0 for _ in range(N)]
    a = save[i][0]
    b = save[i][1]
    path[a].remove(b)
    path[b].remove(a)
    vis[0] = 1
    dfs(0)
    path[a].append(b)
    path[b].append(a)
print(M-cnt)



Fixed submission:
N,M = map(int,input().split())
path = [[] for _ in range(N)]
save = []
for _ in range(M):
    a,b = map(int,input().split())
    save.append([a-1,b-1])
    path[b-1].append(a-1)
    path[a-1].append(b-1)


def dfs(now):
    global cnt
    if not 0 in vis: 
        cnt += 1
        return None
    for new in path[now]:
        if vis[new] == 0:
            vis[new] = 1
            dfs(new)
cnt = 0
for i in range(M):
    vis  = [0 for _ in range(N)]
    a = save[i][0]
    b = save[i][1]
    path[a].remove(b)
    path[b].remove(a)
    vis[0] = 1
    dfs(0)
    path[a].append(b)
    path[b].append(a)
print(M-cnt)
Buggy python submission (verdict: Time Limit Exceeded):
A,B,C,D,E,F = map(int,input().split())
ans = []
for a in range(F // (A*100) + 1):
    for b in range(F // (B*100) + 1):
        water =  100*a*A + 100*b*B 
        if water <= F:
            for c in range(E*water//100//C+1):
                for d in range(E*water//100//D+1):
                    suger = C*c + D*d
                    if suger+water <= F and E*water//100 >= suger:
                        try:
                            n = suger / (suger+water)
                            ans.append([n,suger+water,suger])
                        except:
                            pass
ans.sort()
print(ans[-1][1],ans[-1][2])




Fixed submission:
A,B,C,D,E,F = map(int,input().split())
ans = []
for a in range(F // (A*100) + 1):
    for b in range(F // (B*100) + 1):
        water =  100*a*A + 100*b*B 
        if water <= F:
            for c in range(E*water//100//C+1):
                for d in range(E*water//100//D+1):
                    suger = C*c + D*d
                    if suger+water <= F and E*water//100 >= suger:
                        try:
                            n = suger / (suger+water)
                            ans.append([n,suger+water,suger])
                        except:
                            pass
ans.sort()
print(ans[-1][1],ans[-1][2])
Buggy python submission (verdict: Runtime Error):
#include <stdio.h>
#include <string.h>
#include <math.h>

int main(void){
        char s[1000000];
        scanf("%s", s);
        for (int i = 0; i < strlen(s); i++) {
                if (s[i]=='9') {
                        printf("Yes\n");
                        return 0;
                }
        }
        printf("No\n");
        return 0;
}

Fixed submission:
s=input()
for x in s:
  if x == '9':
    print("Yes")
    exit()
print("No")
Buggy python submission (verdict: Runtime Error):
N = int(input())
L = []
for _ in range(N):
    L.append(int(input()))
def lcm(x, y):
    if x > y:
        x,y = y,x
    if x == 0:
        return y
    r = y % x
    return lcm(r,x)
def gcd(x,y):   
    return   x*y // lcm(x,y)

ans = gcd(L[1],L[0])
for x in L:
    ans = gcd(ans,x)
print(ans)

Fixed submission:
N = int(input())
L = []
for _ in range(N):
    L.append(int(input()))
def lcm(x, y):
    if x > y:
        x,y = y,x
    if x == 0:
        return y
    r = y % x
    return lcm(r,x)
def gcd(x,y):   
    return   x*y // lcm(x,y)

ans = L[0]
for x in L:
    ans = gcd(ans,x)
print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
L = []
for _ in range(N):
    L.append(int(input()))
def lcm(x, y):
    if x > y:
        x,y = y,x
    if x == 0:
        return y
    r = y % x
    return lcm(r,x)
def gcd(x,y):   
    return   x*y // lcm(x,y)

ans = gcd(L[1],L[2])
for x in L:
    ans = gcd(ans,x)
print(ans)

Fixed submission:
N = int(input())
L = []
for _ in range(N):
    L.append(int(input()))
def lcm(x, y):
    if x > y:
        x,y = y,x
    if x == 0:
        return y
    r = y % x
    return lcm(r,x)
def gcd(x,y):   
    return   x*y // lcm(x,y)

ans = L[0]
for x in L:
    ans = gcd(ans,x)
print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
L = list(map(int,input().split()))
one = list(filter(lambda x:x%2!=0,L))
two = list(filter(lambda x:x%4!=0 and x%2==0,L))
four = list(filter(lambda x:x%4==0,L))
if len(one) - len(four) == 1 :
    if len(two) >=1 :
        print("No")
    else:
        print("Yes")
elif len(one) =< len(four):
    print("Yes")
else:
    print("No")


Fixed submission:
N = int(input())
L = list(map(int,input().split()))
one = list(filter(lambda x:x%2!=0,L))
two = list(filter(lambda x:x%4!=0 and x%2==0,L))
four = list(filter(lambda x:x%4==0,L))
if len(one) - len(four) == 1 :
    if len(two) >=1 :
        print("No")
    else:
        print("Yes")
elif len(one) <= len(four):
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
x , y = map(int,input().split())
if x % 3 == 0 or y % 3 == 0 or (x+y) % 3 ==0:
    print("Possible")
else:
    print("Impossible")
remote@G465:~/abc/067$ vim b.py
remote@G465:~/abc/067$ cat b.py
N ,K = map(int,input().split())
L = list(map(int,input().split()))
L = sorted(L)[::-1]
ans = 0
for i in range(K):
    ans = ans + L[i]
print(ans)


Fixed submission:

N ,K = map(int,input().split())
L = list(map(int,input().split()))
L = sorted(L)[::-1]
ans = 0
for i in range(K):
    ans = ans + L[i]
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
L = [None]+list(input().split())
even = []
odd = []
if n % 2 == 0:
    for i in range(1,1+n):
        if i % 2 == 0:
            even.append(L[i])
        else:
            odd.append(L[i])
    for j in range(len(even[::-1])):
        if j == len(even) - 1:
            print(even[::-1][j],end=' ')
        else:
            print(even[::-1][j],end=' ')
    for y in range(len(odd)):
        if y == len(odd) - 1:
            print(odd[y],end='')
        else:
            print(odd[y],end=' ')
    print()
else:
    for i in range(1,1+n):
        if i % 2 == 0:
            even.append(L[i])
        else:
            odd.append(L[i])
    for y in range(len(odd[::-1])):
        if y == len(odd) - 1:
            print(odd[::-1][y],end=' ')
        else:
            print(odd[::-1][y],end=' ')
    for x in range(len(even)):
        if x == len(even) -1:
            print(even[x],end='')
        else:
            print(even[x],end=' ')
    print()

Fixed submission:
n = int(input())
L = [None]+list(input().split())
even = []
odd = []
if n % 2 == 0:
    for i in range(1,1+n):
        if i % 2 == 0:
            even.append(L[i])
        else:
            odd.append(L[i])
    for x in even[::-1]:
        print(x,end=' ')
    for y in odd:
        print(y,end=' ')
    print()
else:
    for i in range(1,1+n):
        if i % 2 == 0:
            even.append(L[i])
        else:
            odd.append(L[i])
    for y in odd[::-1]:
        print(y,end=' ')
    for x in even:
        print(x,end=' ')
    print()

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
L = [None]+list(input().split())
even = []
odd = []
if n % 2 == 0:
    for i in range(1,1+n):
        if i % 2 == 0:
            even.append(L[i])
        else:
            odd.append(L[i])
    for j in range(len(even[::-1])):
        if j == len(even) - 1:
            print(even[::-1][j],end=' ')
        else:
            print(even[::-1][j],end=' ')
    for y in range(len(odd)):
        if y == len(odd) - 1:
            print(odd[y],end='')
        else:
            print(odd[y],end=' ')
    print()
else:
    for i in range(1,1+n):
        if i % 2 == 0:
            even.append(L[i])
        else:
            odd.append(L[i])
    for y in range(len(odd[::-1])):
        if y == len(odd) - 1:
            print(odd[::-1][y],end=' ')
        else:
            print(odd[::-1][y],end=' ')
    for x in range(len(even)):
        if x == len(even) -1:
            print(even[x],end='')
        else:
            print(even[x],end=' ')
    print()

Fixed submission:
n = int(input())
L = [None]+list(input().split())
even = []
odd = []
if n % 2 == 0:
    for i in range(1,1+n):
        if i % 2 == 0:
            even.append(L[i])
        else:
            odd.append(L[i])
    for x in even[::-1]:
        print(x,end=' ')
    for y in odd:
        print(y,end=' ')
    print()
else:
    for i in range(1,1+n):
        if i % 2 == 0:
            even.append(L[i])
        else:
            odd.append(L[i])
    for y in odd[::-1]:
        print(y,end=' ')
    for x in even:
        print(x,end=' ')
    print()
Buggy python submission (verdict: Time Limit Exceeded):
N,A,B = map(int,input().split())
H = []
for _ in range(N):
    H.append(int(input()))
H = sorted(H)
def check(x):
    cnt = 0
    for h in H:
        if h > x * B:
            tmp = (h - x*B) // (A-B)
            #切り上げ
            if tmp * (A-B) != h - x*B: tmp += 1
            cnt += tmp
    if cnt <= x:
        return True
    else:
        return False
# (l,r]
def bisect(l,r):
    if r - l == 1: return r
    mid = (l+r) // 2
    if check(mid):
        return bisect(l,mid)
    else:
        return bisect(mid,r)
    
print(bisect(0,10**40))


Fixed submission:
N,A,B = map(int,input().split())
H = []
for _ in range(N):
    H.append(int(input()))
H = sorted(H)
def check(x):
    cnt = 0
    for h in H:
        if h > x * B:
            tmp = (h - x*B) // (A-B)
            #切り上げ
            if tmp * (A-B) != h - x*B: tmp += 1
            cnt += tmp
    if cnt <= x:
        return True
    else:
        return False
# (l,r]
def bisect(l,r):
    if r - l == 1: return r
    mid = (l+r) // 2
    if check(mid):
        return bisect(l,mid)
    else:
        return bisect(mid,r)
    
print(bisect(0,10**20))
Buggy python submission (verdict: Runtime Error):
students = []
for _ in range(N):
    l = list(map(int,input().split()))
    students.append(l)

check_points = []

for _ in range(M):
    l = list(map(int,input().split()))
    check_points.append(l)

minimum_points = 0

for person in students:
    minimum = 10**10
    for i in range(len(check_points)):
        d=abs(person[0]-check_points[i][0])+abs(person[1]-check_points[i][1])
        if minimum > d:
            minimum = d
            minimum_points = i
    print(minimum_points+1)


Fixed submission:
N, M = map(int,input().split())
students = []
for _ in range(N):
    l = list(map(int,input().split()))
    students.append(l)

check_points = []

for _ in range(M):
    l = list(map(int,input().split()))
    check_points.append(l)

minimum_points = 0

for person in students:
    minimum = 10**10
    for i in range(len(check_points)):
        d=abs(person[0]-check_points[i][0])+abs(person[1]-check_points[i][1])
        if minimum > d:
            minimum = d
            minimum_points = i
    print(minimum_points+1)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
ans = 10**10
for i in range(1,1+int(N)):
    if N % i == 0:
        tmp = i
        s = max(len(str(N // tmp)),len(str(tmp)))
        ans = min(ans,s)
print(ans)

Fixed submission:
N = int(input())
for i in range(1,1+int(N**(1/2))):
    if N % i == 0:
        tmp = i
print(max(len(str(N // tmp)),len(str(tmp))))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
ans = 10**10
for i in range(1,1+int(N)):
    if N % i == 0:
        tmp = i
        s = max(len(str(N // tmp)),len(str(tmp)))
        ans = min(ans,s)
print(ans)

Fixed submission:
N = int(input())
for i in range(1,1+int(N**(1/2))):
    if N % i == 0:
        tmp = i
print(max(len(str(N // tmp)),len(str(tmp))))

Buggy python submission (verdict: Runtime Error):
N = int(input())
an = 10**10
for i in range(1,1+int(N)):
    if N % i == 0:
        tmp = i
        s = max(len(str(N // tmp)),len(str(tmp)))
        ans = min(ans,s)
print(ans)

Fixed submission:
N = int(input())
for i in range(1,1+int(N**(1/2))):
    if N % i == 0:
        tmp = i
print(max(len(str(N // tmp)),len(str(tmp))))

Buggy python submission (verdict: Runtime Error):
N = int(input())
for i in range(1,1+int(N)):
    if N % i == 0:
        tmp = i
s = max(len(str(N // tmp)),len(str(tmp)))
ans = min(ans,s)
print(ans)

Fixed submission:
N = int(input())
for i in range(1,1+int(N**(1/2))):
    if N % i == 0:
        tmp = i
print(max(len(str(N // tmp)),len(str(tmp))))

Buggy python submission (verdict: Runtime Error):
N = int(input())
for i in range(1,1+int(N)):
    if N % i == 0:
        tmp = i
s = max(len(str(N // tmp)),len(str(tmp)))
ans = min(ans,s)

Fixed submission:
N = int(input())
for i in range(1,1+int(N**(1/2))):
    if N % i == 0:
        tmp = i
print(max(len(str(N // tmp)),len(str(tmp))))
Buggy python submission (verdict: Time Limit Exceeded):
X = int(input())
def f(i):
    return i*(i+1)/2

for i in range(1,10**10000000):
    if  f(i) >= X:
        print(i)
        break


Fixed submission:
X = int(input())
def f(i):
    return i*(i+1)/2

for i in range(1,10**1000000):
    if  f(i) >= X:
        print(i)
        break

Buggy python submission (verdict: Time Limit Exceeded):
X = int(input())
def f(i):
    return i*(i+1)/2

for i in range(1,10**100000000000):
    if  f(i) >= X:
        print(i)
        break


Fixed submission:
X = int(input())
def f(i):
    return i*(i+1)/2

for i in range(1,10**1000000):
    if  f(i) >= X:
        print(i)
        break

Buggy python submission (verdict: Time Limit Exceeded):
X = int(input())
def f(i):
    return i*(i+1)/2

for i in range(1,10**1000000000000000):
    if  f(i) >= X:
        print(i)
        break


Fixed submission:
X = int(input())
def f(i):
    return i*(i+1)/2

for i in range(1,10**1000000):
    if  f(i) >= X:
        print(i)
        break