結果
問題 |
No.1895 Mod 2
|
ユーザー |
![]() |
提出日時 | 2022-04-08 22:53:15 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 425 bytes |
コンパイル時間 | 161 ms |
コンパイル使用メモリ | 82,152 KB |
実行使用メモリ | 443,824 KB |
最終ジャッジ日時 | 2024-11-28 13:49:14 |
合計ジャッジ時間 | 39,916 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | TLE * 1 |
other | TLE * 11 |
ソースコード
cnt = 1 n = 10 ** 15 memo = set() while cnt ** 2 <= n: val = cnt ** 2 cnt2 = 1 while cnt2 * val <= n: memo.add(cnt2 * val) cnt2 *= 2 cnt += 1 memo = list(sorted(memo)) import bisect for _ in range(int(input())): l,r = map(int,input().split()) a = (bisect.bisect(memo,l-1)) b = (bisect.bisect(memo,r)) # print(a,b) if (a - b) & 1: print(1) else: print(0)