Skip to content

Instantly share code, notes, and snippets.

@matthew-d-jones
Created March 29, 2018 09:55
Show Gist options
  • Save matthew-d-jones/2efcde51ac90085cca37e0ce5b3759ae to your computer and use it in GitHub Desktop.
Save matthew-d-jones/2efcde51ac90085cca37e0ce5b3759ae to your computer and use it in GitHub Desktop.
# Oversized Pancake Flipper
# https://code.google.com/codejam/contest/3264486/dashboard#s=p0
def read_test_cases_from_file(filename):
with open(filename) as file_object:
file_object.readline()
for test_case_line in file_object:
test_case_string = test_case_line.split(' ')
yield test_case_string[0], int(test_case_string[1])
practice_file = "A-small-practice.in"
for pancake_string, flipper_size in read_test_cases_from_file(practice_file):
print(pancake_string + " " + str(flipper_size))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment