From 4523edde6d648a2c3e812b06e8b33e59d20b4904 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 20 Sep 2024 15:23:20 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- solutions/bronze/cf-863B.mdx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/solutions/bronze/cf-863B.mdx b/solutions/bronze/cf-863B.mdx index 51ec1101cf..8b0f2999e4 100644 --- a/solutions/bronze/cf-863B.mdx +++ b/solutions/bronze/cf-863B.mdx @@ -132,22 +132,22 @@ w = list(map(int, input().split())) w.sort() -res = 10 ** 9 +res = 10**9 # loop through all possible combinations of people in the single kayaks for i in range(0, 2 * n): - for j in range(i + 1, 2 * n): + for j in range(i + 1, 2 * n): - # list 's' will store the weights of the people who need to be placed in tandem kayaks - s = [w[k] for k in range(0, 2 * n) if k != i and k != j] + # list 's' will store the weights of the people who need to be placed in tandem kayaks + s = [w[k] for k in range(0, 2 * n) if k != i and k != j] - temp = 0 + temp = 0 - # calculating instability - for k in range(0, 2 * n - 2, 2): - temp += s[k + 1] - s[k] - - res = min(res, temp) + # calculating instability + for k in range(0, 2 * n - 2, 2): + temp += s[k + 1] - s[k] + + res = min(res, temp) print(res) ```