結果

問題 No.474 色塗り2
ユーザー gew1fw
提出日時 2025-06-12 15:47:39
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 498 bytes
コンパイル時間 297 ms
コンパイル使用メモリ 82,836 KB
実行使用メモリ 116,304 KB
最終ジャッジ日時 2025-06-12 15:47:40
合計ジャッジ時間 1,028 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 1 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

def main():
    input = sys.stdin.read().split()
    T = int(input[0])
    idx = 1
    for _ in range(T):
        A = int(input[idx])
        B = int(input[idx+1])
        C = int(input[idx+2])
        idx +=3
        
        if C % 2 == 0:
            print(0)
            continue
        if (B & (C-1)) != 0:
            print(0)
            continue
        if (A & (C-1)) == 0:
            print(1)
        else:
            print(0)
        
if __name__ == '__main__':
    main()
0