Compare commits

...

2 Commits

Author SHA1 Message Date
Valentin Ochs 1c8057dfde Reduce 01-1 2020-12-04 20:44:01 +01:00
Valentin Ochs 0442a95edb Remove space 2020-12-04 20:39:18 +01:00
2 changed files with 2 additions and 2 deletions

View File

@ -1,2 +1,2 @@
l=set(map(int,open(0)))
print([a*b for a in l if (b:=2020-a) in l])
print([a*b for a in l if(b:=2020-a)in l])

View File

@ -1,4 +1,4 @@
def f(d,e,f):
a,b=*map(int,d.split('-'))
return (f[a-1]==e[0])^(f[b-1]==e[0])
print(sum(f(*x.split()) for x in open(0)))
print(sum(f(*x.split())for x in open(0)))