結果

問題 No.1395 Less Sweet Alchemy
ユーザー O2MTO2MT
提出日時 2021-02-14 22:12:56
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 340 bytes
コンパイル時間 542 ms
コンパイル使用メモリ 86,916 KB
実行使用メモリ 71,480 KB
最終ジャッジ日時 2023-09-29 15:48:38
合計ジャッジ時間 2,404 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
70,908 KB
testcase_01 AC 59 ms
71,084 KB
testcase_02 AC 58 ms
71,164 KB
testcase_03 AC 59 ms
71,400 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 59 ms
71,212 KB
testcase_08 WA -
testcase_09 AC 59 ms
71,292 KB
testcase_10 AC 60 ms
71,088 KB
testcase_11 AC 63 ms
71,076 KB
testcase_12 AC 61 ms
71,300 KB
testcase_13 AC 59 ms
71,080 KB
権限があれば一括ダウンロードができます

ソースコード

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