回答編集履歴
1
コード記載
test
CHANGED
@@ -31,3 +31,37 @@
|
|
31
31
|
#49 98
|
32
32
|
|
33
33
|
```
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
せっかくなので、手直し例の一つを載せておきます。
|
38
|
+
|
39
|
+
```python3
|
40
|
+
|
41
|
+
NN = 1 # int(input())
|
42
|
+
|
43
|
+
list1 = list(range(100))
|
44
|
+
|
45
|
+
list2 = []
|
46
|
+
|
47
|
+
for i in range(NN):
|
48
|
+
|
49
|
+
LL = [">","30"] # input().split()
|
50
|
+
|
51
|
+
hugo = LL[0]
|
52
|
+
|
53
|
+
kazu = int(LL[1])
|
54
|
+
|
55
|
+
if hugo =='>':
|
56
|
+
|
57
|
+
for k in list1:
|
58
|
+
|
59
|
+
if k >= kazu: # 逆にして
|
60
|
+
|
61
|
+
list2.append(k) # 追加していく式にしました
|
62
|
+
|
63
|
+
print(list2)
|
64
|
+
|
65
|
+
#[30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99]
|
66
|
+
|
67
|
+
```
|