結果

問題 No.1389 Clumsy Calculation
ユーザー ohanaohana
提出日時 2023-11-17 09:59:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 100 ms / 2,000 ms
コード長 221 bytes
コンパイル時間 341 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 107,148 KB
最終ジャッジ日時 2023-11-17 09:59:49
合計ジャッジ時間 5,162 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,460 KB
testcase_01 AC 36 ms
53,460 KB
testcase_02 AC 35 ms
53,460 KB
testcase_03 AC 43 ms
62,256 KB
testcase_04 AC 43 ms
62,256 KB
testcase_05 AC 43 ms
62,252 KB
testcase_06 AC 44 ms
62,248 KB
testcase_07 AC 44 ms
62,248 KB
testcase_08 AC 35 ms
53,460 KB
testcase_09 AC 100 ms
102,128 KB
testcase_10 AC 82 ms
99,536 KB
testcase_11 AC 43 ms
62,248 KB
testcase_12 AC 42 ms
60,088 KB
testcase_13 AC 42 ms
60,088 KB
testcase_14 AC 87 ms
107,064 KB
testcase_15 AC 88 ms
107,064 KB
testcase_16 AC 87 ms
106,680 KB
testcase_17 AC 91 ms
107,148 KB
testcase_18 AC 90 ms
107,148 KB
testcase_19 AC 91 ms
107,148 KB
testcase_20 AC 92 ms
107,148 KB
testcase_21 AC 91 ms
107,148 KB
testcase_22 AC 97 ms
107,148 KB
testcase_23 AC 93 ms
107,148 KB
testcase_24 AC 96 ms
107,148 KB
testcase_25 AC 92 ms
107,148 KB
testcase_26 AC 90 ms
105,524 KB
testcase_27 AC 87 ms
106,680 KB
testcase_28 AC 92 ms
107,148 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, x = map(int, input().split())
S = list(map(int, input().split()))
A = [x - s for s in S]

sm = sum(A)

for a, s in zip(A, S):
    if s % 2:
        continue
    if sm - a == s // 2:
        print(s // 2)
        break
0