?
№ | Отправитель | Задача | Язык | Вердикт | Время | Память | Отослано | Протест. | |
---|---|---|---|---|---|---|---|---|---|
153414972 |
Дорешивание: LumosMaxima |
1665B - 35 | PyPy 3 | Полное решение | 577 мс | 15964 КБ | 2022-04-12 00:45:36 | 2022-04-12 00:45:36 |
from math import ceil, log2 from collections import Counter as c for t in range(int(input())): n = int(input()) u = list(map(int, input().split())) acc = c(u).most_common(1)[0][1] if(acc == n): print(0) continue op = ceil(log2(n/acc)) + (n - acc) print(op)
?
?
?
?