add to gothib

This commit is contained in:
Ultrablob 2025-01-20 11:37:00 -05:00
commit 523f45b46a
28 changed files with 419 additions and 0 deletions

12
coal_counting.py Normal file
View file

@ -0,0 +1,12 @@
from bisect import bisect_left
num_children, years = tuple(map(int, input("").split(" ")))
children = sorted(map(int, input("").split(" ")))
coal_thresholds = list(map(int, input("").split(" ")))
for threshold in coal_thresholds:
coal = num_children - bisect_left(children, threshold)
print(coal)