-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtask221.py
More file actions
9 lines (9 loc) · 805 Bytes
/
Copy pathtask221.py
File metadata and controls
9 lines (9 loc) · 805 Bytes
1
2
3
4
5
6
7
8
9
# best: 86(Code Golf International, ox jam) / others: 87(LogicLynx), 87(jailctf merger), 87(intgrah jimboko awu macaque sammyuri), 89(4atj sisyphus luke Seek mukundan), 89(lv1.dev)
# ======================================== 86 ========================================
# p=lambda g:(c:=sum(g,[]).count(0))and[[((i//3)*c+(j//3)<9-c)*g[i%3][j%3]for j in range(3*c)]for i in range(3*c)]
# p=lambda g:(R:=range(c:=sum(g,[]).count(0)))and[[(i*c+j<9-c)*v for j in R for v in s]for i in R for s in g]
# p=lambda g:(c:=sum(g,[]).count(0),R:=range(3*c))and[[(i//3*c+j//3<9-c)*g[i%3][j%3]for j in R]for i in R]
# p=lambda g:(R:=range(c:=sum(g,[]).count(0)*3))and[[(i//3*c+j<27-c)*g[i%3][j%3]for j in R]for i in R]
def p(g):
R=range(c:=str(g).count('0')*3)
return[[(i//3*c+j<27-c)*g[i%3][j%3]for j in R]for i in R]