結果

問題 No.3088 XOR = SUM
ユーザー detteiuu
提出日時 2025-04-05 13:41:19
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 283 bytes
コンパイル時間 528 ms
コンパイル使用メモリ 82,248 KB
実行使用メモリ 76,864 KB
最終ジャッジ日時 2025-04-05 13:41:45
合計ジャッジ時間 24,059 ms
ジャッジサーバーID
(参考情報)
judge6 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 1 WA * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

for _ in range(int(input())):
    N = int(input())

    L, R = 0, 0
    flag = False
    for i in reversed(range(60)):
        if 1<<i & N:
            if not flag:
                L |= 1<<i
                flag = True
            else:
                R |= 1<<i
    
    print(L, R)
0