-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtask283.py
More file actions
9 lines (8 loc) · 751 Bytes
/
task283.py
File metadata and controls
9 lines (8 loc) · 751 Bytes
1
2
3
4
5
6
7
8
9
# best: 72(ox jam) / others: 79(jailctf merger), 82(Code Golf International), 86(intgrah jimboko awu macaque sammyuri), 94(4atj sisyphus luke Seek mukundan), 94(biz)
# ================================= 72 =================================
# p=lambda g:[[t[i]and(4<<sum([*t[i-1:i]+t[i+1:i+2]]+s[j-1:j]+s[j+1:j+2]))%7 for j,t in enumerate(zip(*g))]for i,s in enumerate(g)]
# p=lambda g,E=enumerate:[[t[i]and sum([*t[i-1:i+2]]+s[j-1:j+2])**4%7 for j,t in E(zip(*g))]for i,s in E(g)]
# p=lambda g,E=enumerate:[[t[i]and sum([0,*t][i:i+3]+[0,*s][j:j+3])**4%7 for j,t in E(zip(*g))]for i,s in E(g)]
p=lambda g,E=enumerate:[[t[i]*sum([0,*t][i:i+3]+[0,*s][j:j+3])**4*3%7for j,t in E(zip(*g))]for i,s in E(g)]
# { 20:1, 25:4, 30:2 }
# 5 * { 20:3, 25:5, 30:6 }