mirror of
https://github.com/Crocmagnon/advent-of-code.git
synced 2024-11-24 23:48:13 +01:00
Complete 2020 day 1 part 2
This commit is contained in:
parent
37c8a76c72
commit
c52fe0aa76
1 changed files with 5 additions and 3 deletions
|
@ -8,9 +8,11 @@ def main():
|
||||||
for i, value in enumerate(lines):
|
for i, value in enumerate(lines):
|
||||||
for j in range(i+1, stop):
|
for j in range(i+1, stop):
|
||||||
other = lines[j]
|
other = lines[j]
|
||||||
addition = other + value
|
for k in range(j+1, stop):
|
||||||
if addition == 2020:
|
third = lines[k]
|
||||||
print("result is", other * value)
|
addition = other + value + third
|
||||||
|
if addition == 2020:
|
||||||
|
print("result is", other * value * third)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Loading…
Reference in a new issue