1bbbec2
1
2
3
4
5
from sortedcontainers import SortedList from math import log values = SortedList([9, 4, 16]) print(log(values.pop(), 2))