結果

問題 No.1389 Clumsy Calculation
ユーザー paruf4paruf4
提出日時 2021-02-12 21:42:58
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 249 bytes
コンパイル時間 310 ms
コンパイル使用メモリ 87,220 KB
実行使用メモリ 138,840 KB
最終ジャッジ日時 2023-09-27 03:26:18
合計ジャッジ時間 5,368 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,484 KB
testcase_01 AC 71 ms
71,636 KB
testcase_02 AC 72 ms
71,352 KB
testcase_03 AC 78 ms
76,480 KB
testcase_04 WA -
testcase_05 AC 81 ms
76,524 KB
testcase_06 AC 81 ms
76,432 KB
testcase_07 AC 81 ms
76,552 KB
testcase_08 AC 73 ms
71,584 KB
testcase_09 AC 154 ms
127,216 KB
testcase_10 AC 132 ms
131,468 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 152 ms
117,040 KB
testcase_15 AC 153 ms
117,300 KB
testcase_16 AC 152 ms
117,012 KB
testcase_17 AC 163 ms
138,808 KB
testcase_18 AC 161 ms
138,560 KB
testcase_19 AC 161 ms
138,560 KB
testcase_20 AC 161 ms
138,508 KB
testcase_21 AC 162 ms
138,840 KB
testcase_22 AC 166 ms
138,512 KB
testcase_23 AC 165 ms
138,524 KB
testcase_24 AC 162 ms
138,664 KB
testcase_25 AC 159 ms
138,564 KB
testcase_26 WA -
testcase_27 AC 154 ms
117,028 KB
testcase_28 AC 164 ms
138,568 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, x = map(int, input().split())
s = list(map(int, input().split()))
sm = sum(s)
a = []
for ss in s:
    a.append(x-ss)
s = set(s)
b = []
sa = sum(a)
for aa in a:
    b.append(sa-aa)

for bb in b:
    if bb*2 in s:
        print(bb)
        exit(0)
0