結果

問題 No.1930 XOR of Two Range
ユーザー rlangevinrlangevin
提出日時 2024-03-27 00:05:59
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 124 ms / 2,000 ms
コード長 328 bytes
コンパイル時間 256 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 75,920 KB
最終ジャッジ日時 2024-03-27 00:06:01
合計ジャッジ時間 1,925 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,460 KB
testcase_01 AC 111 ms
75,788 KB
testcase_02 AC 124 ms
75,920 KB
testcase_03 AC 121 ms
75,908 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

T = int(input())
for _ in range(T):
    L, R = map(int, input().split())
    if (R - L) % 4 != 0:
        if (R - L) // 4 % 2:
            print(0)
        else:
            print(1)
    else:
        if (R - L) // 4 % 2:
            print(L + R + 1)
        else:
            print(L + R)
0