Created
December 10, 2020 13:53
-
-
Save Moishe/fd74d2305d746f212b74d383a9a5f6c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f = open('input.txt') | |
steps = [] | |
for l in f: | |
steps.append(int(l.rstrip())) | |
mx = max(steps) + 3 | |
c = len(steps) + 1 | |
print ("a + 3b = %d" % mx) | |
print ("a + b = %d" % c) | |
b = (mx - c) / 2 | |
print ("b = (%d - %d) / 2 = %d" % (mx, c, b)) | |
a = c - b | |
print ("a = %d - %d = %d" % (c, b, a)) | |
print("Solution: a * b = %d" % (a * b)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment