回答編集履歴
1
コード改善
test
CHANGED
@@ -7,3 +7,13 @@
|
|
7
7
|
print((lambda a: (lambda la, lb: "\n".join(map(lambda x: "\n".join(map(lambda xx: " ".join(xx), x)), zip([[(la.remove(x), x)[1] for x in la[:8]] for n in range(len(la)) if la], [[(lb.remove(x), x)[1] for x in lb[:8]] for n in range(len(lb)) if lb]))))(list(__import__("itertools").chain(*zip(a[::4], a[1::4]))), list(__import__("itertools").chain(*zip(a[2::4], a[3::4])))))(['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']))
|
8
8
|
|
9
9
|
```
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
もう少し短くなったので、それも貼っておきます
|
14
|
+
|
15
|
+
```python
|
16
|
+
|
17
|
+
print((lambda M:(lambda a,b:"\n".join(map(lambda x:" ".join(x),[(lambda l:[(l.remove(x), x)[1] for x in l[:8]])(b if n&1 else a) for n in range(len(a+b)) if a or b])))(*[list(__import__("itertools").chain(*zip(M[t::4],M[t+1::4]))) for t in range(0,3,2)]))("abcdefghijklmnopqrstuvwxyz"))
|
18
|
+
|
19
|
+
```
|