結果

問題 No.1389 Clumsy Calculation
ユーザー chineristACchineristAC
提出日時 2020-08-27 23:48:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 125 ms / 2,000 ms
コード長 265 bytes
コンパイル時間 1,813 ms
コンパイル使用メモリ 86,584 KB
実行使用メモリ 108,940 KB
最終ジャッジ日時 2023-09-27 00:44:18
合計ジャッジ時間 4,872 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,324 KB
testcase_01 AC 68 ms
71,264 KB
testcase_02 AC 70 ms
71,352 KB
testcase_03 AC 80 ms
76,272 KB
testcase_04 AC 75 ms
76,352 KB
testcase_05 AC 74 ms
76,188 KB
testcase_06 AC 74 ms
76,192 KB
testcase_07 AC 74 ms
76,320 KB
testcase_08 AC 68 ms
71,408 KB
testcase_09 AC 125 ms
101,476 KB
testcase_10 AC 105 ms
106,120 KB
testcase_11 AC 76 ms
76,408 KB
testcase_12 AC 74 ms
76,320 KB
testcase_13 AC 72 ms
76,364 KB
testcase_14 AC 112 ms
108,448 KB
testcase_15 AC 113 ms
107,996 KB
testcase_16 AC 115 ms
108,040 KB
testcase_17 AC 119 ms
101,636 KB
testcase_18 AC 119 ms
101,568 KB
testcase_19 AC 118 ms
101,508 KB
testcase_20 AC 121 ms
101,576 KB
testcase_21 AC 119 ms
101,636 KB
testcase_22 AC 119 ms
101,616 KB
testcase_23 AC 119 ms
101,644 KB
testcase_24 AC 122 ms
101,788 KB
testcase_25 AC 119 ms
101,804 KB
testcase_26 AC 110 ms
108,940 KB
testcase_27 AC 115 ms
108,424 KB
testcase_28 AC 119 ms
101,848 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,X = map(int,input().split())
S = list(map(int,input().split()))

assert(2<=N<=2*10**5)
assert(0<=X<=10**9)
for i in range(N):
    assert(0<=S[i]<=10**9)

pre_A = [X-S[i] for i in range(N)]

wrong_A = sum(pre_A)

assert(-10**18<=wrong_A<=10**18)

print(X-wrong_A)
0