add to gothib
This commit is contained in:
commit
523f45b46a
28 changed files with 419 additions and 0 deletions
12
coal_counting.py
Normal file
12
coal_counting.py
Normal 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)
|
Loading…
Add table
Add a link
Reference in a new issue