回答編集履歴
5
修正
test
CHANGED
@@ -6,4 +6,6 @@
|
|
6
6
|
|
7
7
|
print(*chain.from_iterable(grid))
|
8
8
|
|
9
|
+
# 0 0 1 0 0 0 1 1 1 0 0 1 1 1 0 0 0 1 0 0
|
10
|
+
|
9
11
|
```
|
4
修正
test
CHANGED
@@ -4,8 +4,6 @@
|
|
4
4
|
|
5
5
|
from itertools import chain
|
6
6
|
|
7
|
-
|
7
|
+
print(*chain.from_iterable(grid))
|
8
|
-
|
9
|
-
print(*new_grid)
|
10
8
|
|
11
9
|
```
|
3
修正
test
CHANGED
@@ -6,6 +6,6 @@
|
|
6
6
|
|
7
7
|
new_grid = chain.from_iterable(grid)
|
8
8
|
|
9
|
-
print(
|
9
|
+
print(*new_grid)
|
10
10
|
|
11
11
|
```
|
2
追記
test
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
`for`を使いたくないなら、
|
2
|
+
|
1
3
|
```Python
|
2
4
|
|
3
5
|
from itertools import chain
|
1
追記
test
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
```Python
|
2
2
|
|
3
|
-
from itertools import
|
3
|
+
from itertools import chain
|
4
4
|
|
5
5
|
new_grid = chain.from_iterable(grid)
|
6
6
|
|