We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d3848ae commit 0f5fd3aCopy full SHA for 0f5fd3a
โํผ๋ก๋.pyโ
@@ -0,0 +1,4 @@
1
+from itertools import permutations
2
+
3
+def solution(k, dungeons):
4
+ return max((lambda t: sum((t := t - j) >= 0 and t + j >= i for i, j in p))(k) for p in permutations(dungeons))
0 commit comments