結果

問題 No.1895 Mod 2
ユーザー 👑 H20H20
提出日時 2022-04-08 23:05:00
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 175 ms / 2,000 ms
コード長 194 bytes
コンパイル時間 441 ms
コンパイル使用メモリ 87,328 KB
実行使用メモリ 79,448 KB
最終ジャッジ日時 2023-08-19 01:38:29
合計ジャッジ時間 2,970 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
71,092 KB
testcase_01 AC 139 ms
78,788 KB
testcase_02 AC 164 ms
79,448 KB
testcase_03 AC 131 ms
78,116 KB
testcase_04 AC 136 ms
78,324 KB
testcase_05 AC 135 ms
78,308 KB
testcase_06 AC 137 ms
78,120 KB
testcase_07 AC 136 ms
78,476 KB
testcase_08 AC 149 ms
78,552 KB
testcase_09 AC 175 ms
79,092 KB
testcase_10 AC 132 ms
78,628 KB
testcase_11 AC 147 ms
78,908 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
T = int(input())

def func(v):
    return math.isqrt(v)+math.isqrt(v//2)

for _ in range(T):
    L,R = map(int, input().split())
    l = func(L-1)
    r = func(R)
    print((r-l)%2)
0