結果

問題 No.1363 [Zelkova Last Tune] 誰がその最後のベルを鳴らすのか?
ユーザー satama6satama6
提出日時 2022-10-19 01:29:51
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 253 ms / 2,000 ms
コード長 429 bytes
コンパイル時間 130 ms
コンパイル使用メモリ 10,708 KB
実行使用メモリ 8,632 KB
最終ジャッジ日時 2023-09-11 16:58:32
合計ジャッジ時間 1,993 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,864 KB
testcase_01 AC 143 ms
8,632 KB
testcase_02 AC 253 ms
8,512 KB
testcase_03 AC 15 ms
7,824 KB
testcase_04 AC 14 ms
7,936 KB
権限があれば一括ダウンロードができます

ソースコード

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