結果

問題 No.1389 Clumsy Calculation
コンテスト
ユーザー lllllll88938494
提出日時 2022-01-12 06:48:49
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 68 ms / 2,000 ms
コード長 258 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 313 ms
コンパイル使用メモリ 85,504 KB
実行使用メモリ 109,568 KB
最終ジャッジ日時 2026-05-10 09:17:30
合計ジャッジ時間 4,217 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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