結果

問題 No.1389 Clumsy Calculation
ユーザー brthyyjpbrthyyjp
提出日時 2021-02-13 14:50:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 124 ms / 2,000 ms
コード長 240 bytes
コンパイル時間 251 ms
コンパイル使用メモリ 87,020 KB
実行使用メモリ 111,640 KB
最終ジャッジ日時 2023-09-27 23:18:54
合計ジャッジ時間 5,272 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
71,260 KB
testcase_01 AC 67 ms
71,636 KB
testcase_02 AC 65 ms
71,260 KB
testcase_03 AC 75 ms
76,320 KB
testcase_04 AC 70 ms
76,312 KB
testcase_05 AC 74 ms
76,572 KB
testcase_06 AC 73 ms
76,472 KB
testcase_07 AC 69 ms
76,324 KB
testcase_08 AC 66 ms
71,540 KB
testcase_09 AC 124 ms
103,332 KB
testcase_10 AC 102 ms
107,696 KB
testcase_11 AC 71 ms
76,488 KB
testcase_12 AC 72 ms
76,440 KB
testcase_13 AC 73 ms
76,464 KB
testcase_14 AC 114 ms
111,348 KB
testcase_15 AC 108 ms
111,424 KB
testcase_16 AC 108 ms
111,640 KB
testcase_17 AC 117 ms
103,324 KB
testcase_18 AC 120 ms
103,168 KB
testcase_19 AC 116 ms
103,380 KB
testcase_20 AC 116 ms
103,352 KB
testcase_21 AC 116 ms
103,404 KB
testcase_22 AC 119 ms
103,604 KB
testcase_23 AC 115 ms
103,288 KB
testcase_24 AC 115 ms
103,436 KB
testcase_25 AC 117 ms
103,316 KB
testcase_26 AC 108 ms
110,952 KB
testcase_27 AC 113 ms
111,264 KB
testcase_28 AC 118 ms
103,312 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, x = map(int, input().split())
S = list(map(int, input().split()))
A = [0]*n
B = [0]*n
for i, s in enumerate(S):
    A[i] = x-s
    B[i] = x-s//2
y = sum(A)
for i in range(n):
    if y-A[i]+B[i] == x:
        print(x-B[i])
        exit()
0