Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
import sys
import io
import heapq


def main():
    N,K = list(map(int, sys.stdin.readline().split()))
    A_list = list(map(int, sys.stdin.readline().split()))
    

    # queue = [ [ -length of the log cut  , the initial length of log , the number of cut ] ]
    hq = [ [-a,a,0] for a in A_list ]
    heapq.heapify(hq)

    while K:
        _ , len_a, num_cut = heapq.heappop(hq)
        num_cut += 1
        K -= 1

        heapq.heappush(hq, [ -(len_a / (num_cut + 1)) , len_a , num_cut] )
    
    
    len_cut , len_a, num_cut = heapq.heappop(hq)
    len_cut = -(len_cut // 1)  # round up (len_cut is negative number)
    print( int(len_cut) )


if __name__ == "__main__":
    main()


Fixed submission:
# -*- coding: utf-8 -*-
import sys
from decimal import Decimal, ROUND_HALF_UP


def main():
    N,K = list(map(int, sys.stdin.readline().split()))
    A_list = list(map(int, sys.stdin.readline().split()))


    def check(length :int) -> bool:
        cnt = 0

        for a in A_list:
            if a >= length:
                quotient = a / length
                divide = -(-quotient // 1)  # round up
                cnt += (divide - 1)
        
        return (True if cnt <= K else False)


    L = 0.1            # the minimum length
    R = max(A_list)  # the maximum length

    while (R - L) > 0.01:
        M = L + (R - L) / 2

        if check(M):
            R = M
        else:
            L = M
    
    
    ans = float( Decimal(str(M)).quantize(Decimal('1E-1'), rounding=ROUND_HALF_UP) )
    ans = -(-ans // 1)  # round up
    print( int(ans) )


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
import sys
import heapq


def main():
    N,K = list(map(int, sys.stdin.readline().split()))
    A_list = list(map(int, sys.stdin.readline().split()))
    

    # hq = [ [ -length of the log cut  , the initial length of log , the number of cut ] ]
    hq = [ [-a,a,0] for a in A_list ]
    heapq.heapify(hq)

    while K:
        _ , len_a, num_cut = heapq.heappop(hq)
        num_cut += 1
        K -= 1

        heapq.heappush(hq, [ -(len_a / (num_cut + 1)) , len_a , num_cut] )
    
    
    len_cut , len_a, num_cut = heapq.heappop(hq)
    len_cut = -(len_cut // 1)  # round up (len_cut is negative number)
    print( int(len_cut) )


if __name__ == "__main__":
    main()


Fixed submission:
# -*- coding: utf-8 -*-
import sys
from decimal import Decimal, ROUND_HALF_UP


def main():
    N,K = list(map(int, sys.stdin.readline().split()))
    A_list = list(map(int, sys.stdin.readline().split()))


    def check(length :int) -> bool:
        cnt = 0

        for a in A_list:
            if a >= length:
                quotient = a / length
                divide = -(-quotient // 1)  # round up
                cnt += (divide - 1)
        
        return (True if cnt <= K else False)


    L = 0.1            # the minimum length
    R = max(A_list)  # the maximum length

    while (R - L) > 0.01:
        M = L + (R - L) / 2

        if check(M):
            R = M
        else:
            L = M
    
    
    ans = float( Decimal(str(M)).quantize(Decimal('1E-1'), rounding=ROUND_HALF_UP) )
    ans = -(-ans // 1)  # round up
    print( int(ans) )


if __name__ == "__main__":
    main()