結果

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

ソースコード

diff #

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

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

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

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

main()
0