結果

問題 No.1895 Mod 2
ユーザー ニックネームニックネーム
提出日時 2022-04-08 23:19:26
言語 PyPy3
(7.3.15)
結果
MLE  
実行時間 -
コード長 292 bytes
コンパイル時間 961 ms
コンパイル使用メモリ 81,920 KB
実行使用メモリ 1,527,724 KB
最終ジャッジ日時 2024-05-06 09:05:14
合計ジャッジ時間 7,108 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 MLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

from bisect import bisect_right
a = []
for i in range(1, 10**8+1):
    j = i*i
    if j > 10**15: break
    while j <= 10**15:
        a.append(j)
        j *= 2
a.sort()
for _ in range(int(input())):
    l, r = map(int, input().split())
    print((bisect_right(a, r)-bisect_right(a, l-1))%2)
0