結果

問題 No.1895 Mod 2
ユーザー googol_S0googol_S0
提出日時 2022-04-08 22:08:38
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 148 ms / 2,000 ms
コード長 207 bytes
コンパイル時間 348 ms
コンパイル使用メモリ 87,268 KB
実行使用メモリ 78,356 KB
最終ジャッジ日時 2023-08-19 00:40:58
合計ジャッジ時間 2,655 ms
ジャッジサーバーID
(参考情報)
judge12 / judge9
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
71,388 KB
testcase_01 AC 146 ms
77,628 KB
testcase_02 AC 139 ms
78,160 KB
testcase_03 AC 145 ms
78,356 KB
testcase_04 AC 131 ms
78,232 KB
testcase_05 AC 145 ms
77,616 KB
testcase_06 AC 148 ms
77,632 KB
testcase_07 AC 142 ms
77,824 KB
testcase_08 AC 139 ms
78,168 KB
testcase_09 AC 145 ms
77,780 KB
testcase_10 AC 134 ms
77,608 KB
testcase_11 AC 141 ms
77,980 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def f(x):
  v=0
  for i in range(29,-1,-1):
    w=v+(1<<i)
    if w*w<=x:
      v=w
  return v
for t in range(int(input())):
  L,R=map(int,input().split())
  L-=1
  v=(f(R)+f(R//2)+f(L)+f(L//2))&1
  print(v)
0