回答編集履歴

3

スキップ処理削除

2020/01/10 03:38

投稿

shiracamus
shiracamus

スコア5406

test CHANGED
@@ -6,15 +6,11 @@
6
6
 
7
7
  ```py
8
8
 
9
- skip_first = False
10
-
11
9
  try:
12
10
 
13
11
  with open('text.txt') as f:
14
12
 
15
13
  s01, s02, s03, s04, s05, s06, s07, s08 = map(int, f.read().strip().split())
16
-
17
- skip_first = True
18
14
 
19
15
  except FileNotFoundError:
20
16
 
@@ -40,12 +36,6 @@
40
36
 
41
37
  for n01 in range(s01, STOP):
42
38
 
43
- if skip_first:
44
-
45
- skip_first = False
46
-
47
- continue
48
-
49
39
  with open('text.txt', 'w') as f:
50
40
 
51
41
  print(n01, n02, n03, n04, n05, n06, n07, n08, file=f)

2

STOP値修正

2020/01/10 03:38

投稿

shiracamus
shiracamus

スコア5406

test CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
 
24
24
 
25
- STOP = 2
25
+ STOP = 33
26
26
 
27
27
  for n08 in range(s08, STOP):
28
28
 

1

バグ修正

2020/01/10 03:36

投稿

shiracamus
shiracamus

スコア5406

test CHANGED
@@ -6,35 +6,45 @@
6
6
 
7
7
  ```py
8
8
 
9
+ skip_first = False
10
+
9
11
  try:
10
12
 
11
13
  with open('text.txt') as f:
12
14
 
13
- n01, n02, n03, n04, n05, n06, n07, n08 = map(int, f.read().strip().split())
15
+ s01, s02, s03, s04, s05, s06, s07, s08 = map(int, f.read().strip().split())
16
+
17
+ skip_first = True
14
18
 
15
19
  except FileNotFoundError:
16
20
 
17
- n01 = n02 = n03 = n04 = n05 = n06 = n07 = n08 = 0
21
+ s01 = s02 = s03 = s04 = s05 = s06 = s07 = s08 = 0
18
22
 
19
23
 
20
24
 
21
- STOP = 33
25
+ STOP = 2
22
26
 
23
- for n08 in range(n01, STOP):
27
+ for n08 in range(s08, STOP):
24
28
 
25
- for n07 in range(n02, STOP):
29
+ for n07 in range(s07, STOP):
26
30
 
27
- for n06 in range(n03, STOP):
31
+ for n06 in range(s06, STOP):
28
32
 
29
- for n05 in range(n04, STOP):
33
+ for n05 in range(s05, STOP):
30
34
 
31
- for n04 in range(n05, STOP):
35
+ for n04 in range(s04, STOP):
32
36
 
33
- for n03 in range(n06, STOP):
37
+ for n03 in range(s03, STOP):
34
38
 
35
- for n02 in range(n07, STOP):
39
+ for n02 in range(s02, STOP):
36
40
 
37
- for n01 in range(n08, STOP):
41
+ for n01 in range(s01, STOP):
42
+
43
+ if skip_first:
44
+
45
+ skip_first = False
46
+
47
+ continue
38
48
 
39
49
  with open('text.txt', 'w') as f:
40
50