結果
問題 | No.1930 XOR of Two Range |
ユーザー |
![]() |
提出日時 | 2022-05-06 21:54:31 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 280 ms / 2,000 ms |
コード長 | 285 bytes |
コンパイル時間 | 269 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 76,724 KB |
最終ジャッジ日時 | 2024-07-05 23:07:26 |
合計ジャッジ時間 | 1,703 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 3 |
ソースコード
t = int(input()) for _ in range(t): l, r = map(int, input().split()) x = (((l + r) - (l * 2) + 3) // 4) % 2 if (l + r) % 2 == 1: print(x) else: if (((l + r) - (l * 2)) // 2 + 1) % 2 == 0: print(x) else: print((l + r) ^ x)