Initial commit
This commit is contained in:
commit
2c6dc6e8be
2
01-1-1.py
Normal file
2
01-1-1.py
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
l=set(map(int,open("/dev/stdin").readlines()))
|
||||||
|
print([a*(2020-a) for a in l if 2020-a in l])
|
2
01-2-1.py
Normal file
2
01-2-1.py
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
l=list(map(int, open("/dev/stdin").readlines()))
|
||||||
|
print([a*b*c for a in l for b in l for c in l if a+b+c==2020])
|
1
02-1-1.py
Normal file
1
02-1-1.py
Normal file
|
@ -0,0 +1 @@
|
||||||
|
print(sum(1 for l in map(lambda x:x.split(),open("/dev/stdin").readlines()) if int(l[0].split('-')[0])<=l[2].count(l[1][0])<=int(l[0].split('-')[1])))
|
Loading…
Reference in New Issue
Block a user