Skip to content

Commit d5bf4f6

Browse files
committed
better 1a_v2
1 parent da146d2 commit d5bf4f6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

2020/1a_v2.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33

44
def main():
5-
print(sum(load_ints('1.txt')))
5+
lines = load_ints('1.txt')
6+
print(sum(i*j for i in lines for j in lines if i + j == 2020))
67

78

89
main()

0 commit comments

Comments
 (0)