結果
| 問題 | No.1895 Mod 2 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-04-08 23:34:01 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 393 bytes |
| 記録 | |
| コンパイル時間 | 462 ms |
| コンパイル使用メモリ | 85,508 KB |
| 実行使用メモリ | 82,596 KB |
| 最終ジャッジ日時 | 2026-05-22 14:37:42 |
| 合計ジャッジ時間 | 5,446 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | AC * 4 WA * 7 |
ソースコード
T = int(input())
def counts_pow(n,M,k):
if M==0:
return 0
l,r=0,M
while(r-l>1):
mid=(r+l)//2
if mid**n*k<=M:
l=mid
else:
r=mid
return l
for _ in range(T):
L, R = map(int,input().split())
count=0
count+=counts_pow(2,R,1)-counts_pow(2,L-1,1)
count+=counts_pow(2,R,2)-counts_pow(2,L-1,2)
print(count%2)