結果

問題 No.1895 Mod 2
ユーザー ShirotsumeShirotsume
提出日時 2022-04-03 23:31:01
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 362 bytes
コンパイル時間 344 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 76,576 KB
最終ジャッジ日時 2024-05-06 00:46:21
合計ジャッジ時間 1,659 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
51,968 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 69 ms
74,496 KB
testcase_04 AC 83 ms
76,576 KB
testcase_05 AC 72 ms
76,432 KB
testcase_06 AC 78 ms
76,032 KB
testcase_07 AC 74 ms
76,416 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda: sys.stdin.readline().rstrip()
ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(mi())

def solve():
    l, r = mi()
    l -= 1
    ans1 = int(r ** 0.5) + int(r ** 0.5 / 2 ** 0.5)
    ans2 = int(l ** 0.5) + int(l ** 0.5 / 2 ** 0.5)
    print((ans1 + ans2) % 2)

for _ in range(int(input())):
    solve()
0