Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Simple solution in Clear category for Bag of Santa Claus by tom-tom
from math import e
best_gift = None
def choose_good_gift(current_gift, gifts_in_bag, gift_number):
global best_gift
best_gift = current_gift if gift_number == 1 else max(best_gift, current_gift)
return gift_number > gifts_in_bag / e and current_gift >= best_gift
Aug. 1, 2017
Comments: