結果

問題 No.1395 Less Sweet Alchemy
ユーザー O2MT
提出日時 2021-02-14 22:12:56
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 340 bytes
コンパイル時間 189 ms
コンパイル使用メモリ 82,128 KB
実行使用メモリ 54,368 KB
最終ジャッジ日時 2024-07-22 09:57:54
合計ジャッジ時間 1,420 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 8 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

N,X = map(int,input().split())
C = list(map(int,input().split()))
XCP,XCM = [],[]
for c in C:
    num = X-c
    if num >= 0:
        XCP.append(num)
    else:
        XCM.append(num)

if XCP == [] or XCM == []:
    print("No")
else:
    sumP,sumM = sum(XCP),sum(XCM)
    if sumP%sumM == 0:
        print("Yes")
    else:
        print("No")
0