-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtask003.py
More file actions
17 lines (16 loc) · 929 Bytes
/
task003.py
File metadata and controls
17 lines (16 loc) · 929 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# best: 58(jacekw Potatoman nauti natte, Code Golf International, 4atj sisyphus luke Seek mukundan, lv1.dev, ALE-Agent, santa2024, FuunAgent, natte, import itertools, jailctf merger, ox jam, kdmitrie, intgrah jimboko awu macaque sammyuri, JRKKX) / others: 61(jonas ryno kg583 kabutack), 61(cubbus), 61(jacekwl Potatoman nauti), 61(Ali), 61(JRK)
# ========================== 58 ==========================
# サイクルを発見する(3サイクルか4サイクルかの二択)
# [c*2for c in r]
# map(lambda x:x*2,r)
# def p(g):
# if g[:3]==g[3:]:
# return[[c*2for c in r]for r in g+g[:3]]
# else:
# return[[c*2for c in r]for r in g+g[2:5]]
# lambda g:[[c*2for c in r]for r in g+g[(g[:3]*2!=g)*2:][:3]]
# lambda g:eval(str(g+g[(g[2]!=g[5])*2:][:3]).replace(*"12"))
p=lambda g:[[c*2for c in r]for r in g+g[(g[2]!=g[5])*2:][:3]]
# g+g[(g[2]!=g[5])*2:][:3]
# [g[:3],g[2:5]][g[:3]*2!=g]
# [a:=g[:3],g[2:5]][a*2!=g]