結果

問題 No.1363 [Zelkova Last Tune] 誰がその最後のベルを鳴らすのか?
ユーザー satama6
提出日時 2022-10-19 01:29:51
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 326 ms / 2,000 ms
コード長 429 bytes
コンパイル時間 195 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-06-29 07:05:06
合計ジャッジ時間 2,092 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())

while T > 0:
    T -= 1
    K, X, Y = map(int, input().split())
    A = list(map(int, input().split()))
    P = list(map(int, input().split()))

    nim = 0
    for k in range(K):
        nim ^= A[k] % (P[k]+1)
    
    if nim == 0:
        if Y >= X:
            print('C')
        else:
            print('Z')
    else:
        if Y >= X + nim:
            print('C')
        else:
            print('Z')
    
0