結果

問題 No.1389 Clumsy Calculation
ユーザー lllllll88938494lllllll88938494
提出日時 2022-01-12 06:48:49
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 89 ms / 2,000 ms
コード長 258 bytes
コンパイル時間 174 ms
コンパイル使用メモリ 82,144 KB
実行使用メモリ 107,876 KB
最終ジャッジ日時 2024-04-27 07:50:13
合計ジャッジ時間 3,893 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
52,408 KB
testcase_01 AC 34 ms
53,408 KB
testcase_02 AC 33 ms
53,196 KB
testcase_03 AC 40 ms
62,028 KB
testcase_04 AC 41 ms
60,360 KB
testcase_05 AC 39 ms
61,168 KB
testcase_06 AC 40 ms
61,260 KB
testcase_07 AC 43 ms
61,636 KB
testcase_08 AC 34 ms
52,340 KB
testcase_09 AC 89 ms
102,260 KB
testcase_10 AC 67 ms
97,396 KB
testcase_11 AC 43 ms
61,120 KB
testcase_12 AC 41 ms
61,224 KB
testcase_13 AC 39 ms
61,620 KB
testcase_14 AC 78 ms
105,220 KB
testcase_15 AC 80 ms
105,700 KB
testcase_16 AC 80 ms
105,180 KB
testcase_17 AC 84 ms
107,232 KB
testcase_18 AC 82 ms
107,376 KB
testcase_19 AC 83 ms
107,560 KB
testcase_20 AC 86 ms
107,384 KB
testcase_21 AC 85 ms
107,876 KB
testcase_22 AC 85 ms
107,700 KB
testcase_23 AC 87 ms
107,460 KB
testcase_24 AC 83 ms
107,316 KB
testcase_25 AC 84 ms
107,496 KB
testcase_26 AC 81 ms
104,308 KB
testcase_27 AC 79 ms
105,068 KB
testcase_28 AC 87 ms
107,544 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k = map(int,input().split())
ns=list(map(int,input().split()))
cnt=0
for i in ns:
    cnt += k-i
    
for i in range(n):
    if ns[i]%2 != 0:
        continue
    t=k-ns[i]
    t2=k-(ns[i]//2)
    if (cnt-t) + t2 == k:
        print(ns[i]//2)
        break
0