예제 #1
0
def day_two_part_one():
    input_lines = get_input_lines('day_two')
    return len(get_valid_sled_rental_passwords(input_lines))
예제 #2
0
def day_ten_part_one():
    input_lines = get_input_lines('day_ten')
    return get_product_of_one_and_three_jolt_differences(input_lines)
예제 #3
0
def day_twelve_part_two():
    input_lines = get_input_lines('day_twelve')
    return get_final_location_manhattan_distance_with_waypoint(input_lines)
예제 #4
0
def day_four_part_two():
    input_lines = get_input_lines('day_four')
    return get_count_of_passports_with_valid_fields_and_data(input_lines)
예제 #5
0
def day_six_part_two():
    input_lines = get_input_lines('day_six')
    return get_count_of_questions_all_answered_yes_to(input_lines)
예제 #6
0
def day_eleven_part_one():
    input_lines = get_input_lines('day_eleven')
    return get_count_of_occupied_seats(input_lines)
예제 #7
0
def day_eighteen_part_one():
    input_lines = get_input_lines('day_eighteen')
    return sum([evaluate_expression(il) for il in input_lines])
예제 #8
0
def day_seven_part_one():
    input_lines = get_input_lines('day_seven')
    return get_count_of_bags_containing_bag_type(input_lines, 'shiny gold')
예제 #9
0
def day_nine_part_one():
    input_lines = get_input_lines('day_nine')
    return get_first_value_not_sum_of_two_preamble_values(input_lines, 25)
예제 #10
0
def day_nine_part_two():
    input_lines = get_input_lines('day_nine')
    return get_sum_of_range_min_max(input_lines, 25)
예제 #11
0
def day_fifteen_part_two():
    input_lines = get_input_lines('day_fifteen')[0]
    return get_nth_number_spoken(input_lines, 30000000)
예제 #12
0
def day_fifteen_part_one():
    input_lines = get_input_lines('day_fifteen')[0]
    return get_nth_number_spoken(input_lines, 2020)
예제 #13
0
def day_thirteen_part_one():
    input_lines = get_input_lines('day_thirteen')
    return find_earliest_bus_to_take(input_lines)
예제 #14
0
def day_five_part_two():
    input_lines = get_input_lines('day_five')
    return get_missing_seat_id(input_lines)
예제 #15
0
def day_eighteen_part_two():
    input_lines = get_input_lines('day_eighteen')
    return sum([evaluate_expression_in_reverse_precedence(il) for il in input_lines])
예제 #16
0
def day_five_part_one():
    input_lines = get_input_lines('day_five')
    return get_highest_seat_id(input_lines)
예제 #17
0
def day_eight_part_one():
    input_lines = get_input_lines('day_eight')
    return get_accumulator_value_after_one_loop(input_lines)
예제 #18
0
def day_seven_part_two():
    input_lines = get_input_lines('day_seven')
    return get_count_of_total_bags_for_bag_type(input_lines, 'shiny gold')
예제 #19
0
def day_eight_part_two():
    input_lines = get_input_lines('day_eight')
    return get_accumulator_value_after_termination(input_lines)
예제 #20
0
def day_six_part_one():
    input_lines = get_input_lines('day_six')
    return get_count_of_distinct_yes_answers_for_all_groups(input_lines)
예제 #21
0
def day_three_part_two():
    input_lines = get_input_lines('day_three')
    slopes = [[1, 1], [3, 1], [5, 1], [7, 1], [1, 2]]
    return get_product_of_all_trees_in_path_of_slopes(input_lines, slopes)
예제 #22
0
def day_eleven_part_two():
    input_lines = get_input_lines('day_eleven')
    return get_count_of_line_of_site_seating_occupied_seats(input_lines)
예제 #23
0
def day_three_part_one():
    input_lines = get_input_lines('day_three')
    slope = [3, 1]
    return count_trees_in_path_of_slope(input_lines, slope)
예제 #24
0
def day_twelve_part_one():
    input_lines = get_input_lines('day_twelve')
    return get_final_location_manhattan_distance(input_lines)
예제 #25
0
def day_sixteen_part_one():
    input_lines = get_input_lines('day_sixteen')
    return get_scanning_error_rate(input_lines)
예제 #26
0
def day_four_part_one():
    input_lines = get_input_lines('day_four')
    return get_count_of_passports_with_valid_fields(input_lines)
예제 #27
0
def day_one_part_one():
    input_lines = get_input_lines('day_one')
    expense_report = list(map(int, input_lines))
    return get_product_of_2_values_summing_to_2020(expense_report)
예제 #28
0
def day_two_part_two():
    input_lines = get_input_lines('day_two')
    return len(get_valid_toboggan_rental_passwords(input_lines))
예제 #29
0
def day_ten_part_two():
    input_lines = get_input_lines('day_ten')
    return get_count_of_distinct_adapter_configurations(input_lines)