回答編集履歴

1

別解

2020/06/15 06:32

投稿

ozwk
ozwk

スコア13553

test CHANGED
@@ -1,9 +1,25 @@
1
+ 1
2
+
1
3
  ```python
2
4
 
3
5
  import numpy as np
4
6
 
5
7
  xs = np.array([60, 30, 40])
6
8
 
7
- print(-min(-xs))
9
+ print(-min(-xs)) # => 60
8
10
 
9
11
  ```
12
+
13
+
14
+
15
+ 2
16
+
17
+ ```python
18
+
19
+ from functools import reduce
20
+
21
+ src = [60, 30, 40]
22
+
23
+ print(reduce(lambda x, y : x if x > y else y , src )) # => 60
24
+
25
+ ```