結果

問題 No.1363 [Zelkova Last Tune] 誰がその最後のベルを鳴らすのか?
コンテスト
ユーザー satama6
提出日時 2022-10-19 01:29:51
言語 Python3
(3.14.3 + numpy 2.4.2 + scipy 1.17.0)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 256 ms / 2,000 ms
コード長 429 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 390 ms
コンパイル使用メモリ 20,696 KB
実行使用メモリ 15,356 KB
最終ジャッジ日時 2026-03-18 17:31:23
合計ジャッジ時間 2,440 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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