結果

問題 No.669 対決!!! 飲み比べ
ユーザー GrayCoder
提出日時 2018-03-23 23:58:48
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 373 bytes
コンパイル時間 94 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 35,184 KB
最終ジャッジ日時 2024-06-24 23:40:59
合計ジャッジ時間 1,923 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 23 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    N, K = map(int, input().split())
    A = tuple(map(int, input().split()))

    if not sum(A):
        print('NO')
        return

    a = []
    for i in A:
        n, m = divmod(i, K)
        a.extend([K] * n)
        a.append(m)

    ans = a[0]
    for i in a[1:]:
        ans ^= i

    if ans:
        print('YES')
    else:
        print('NO')


main()
0