結果

問題 No.1389 Clumsy Calculation
ユーザー HAPPAHAPPA
提出日時 2021-02-12 21:35:15
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 101 ms / 2,000 ms
コード長 415 bytes
コンパイル時間 232 ms
コンパイル使用メモリ 10,784 KB
実行使用メモリ 31,240 KB
最終ジャッジ日時 2023-09-27 03:09:59
合計ジャッジ時間 3,448 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,852 KB
testcase_01 AC 16 ms
7,960 KB
testcase_02 AC 16 ms
7,760 KB
testcase_03 AC 17 ms
8,516 KB
testcase_04 AC 17 ms
8,596 KB
testcase_05 AC 17 ms
8,676 KB
testcase_06 AC 17 ms
8,316 KB
testcase_07 AC 17 ms
8,196 KB
testcase_08 AC 16 ms
7,816 KB
testcase_09 AC 77 ms
30,556 KB
testcase_10 AC 49 ms
11,360 KB
testcase_11 AC 17 ms
8,248 KB
testcase_12 AC 17 ms
8,240 KB
testcase_13 AC 16 ms
8,348 KB
testcase_14 AC 98 ms
30,008 KB
testcase_15 AC 95 ms
29,956 KB
testcase_16 AC 97 ms
29,984 KB
testcase_17 AC 99 ms
30,156 KB
testcase_18 AC 91 ms
30,188 KB
testcase_19 AC 97 ms
30,172 KB
testcase_20 AC 96 ms
30,088 KB
testcase_21 AC 92 ms
30,100 KB
testcase_22 AC 93 ms
30,176 KB
testcase_23 AC 101 ms
30,156 KB
testcase_24 AC 92 ms
30,100 KB
testcase_25 AC 97 ms
30,080 KB
testcase_26 AC 101 ms
31,240 KB
testcase_27 AC 95 ms
30,080 KB
testcase_28 AC 93 ms
30,020 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    n, x = map(int, input().split())
    S = list(map(int, input().split()))

    tot = sum(S)
    for i in range(n):
        if S[i] % 2 == 0:
            if tot - S[i] // 2 == x * (n - 1):
                print(S[i] // 2)
                break


if __name__ == '__main__':
    resolve()
0