結果

問題 No.1389 Clumsy Calculation
コンテスト
ユーザー ohana
提出日時 2023-11-17 09:59:43
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 65 ms / 2,000 ms
コード長 221 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 285 ms
コンパイル使用メモリ 85,504 KB
実行使用メモリ 110,720 KB
最終ジャッジ日時 2026-04-13 08:29:10
合計ジャッジ時間 4,147 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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