結果

問題 No.1895 Mod 2
ユーザー ShirotsumeShirotsume
提出日時 2022-04-03 23:33:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 86 ms / 2,000 ms
コード長 418 bytes
コンパイル時間 267 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 76,644 KB
最終ジャッジ日時 2024-05-06 00:46:13
合計ジャッジ時間 1,703 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
52,260 KB
testcase_01 AC 71 ms
75,264 KB
testcase_02 AC 83 ms
76,644 KB
testcase_03 AC 74 ms
75,008 KB
testcase_04 AC 86 ms
76,580 KB
testcase_05 AC 75 ms
76,032 KB
testcase_06 AC 76 ms
76,472 KB
testcase_07 AC 77 ms
76,492 KB
testcase_08 AC 80 ms
76,504 KB
testcase_09 AC 77 ms
76,032 KB
testcase_10 AC 69 ms
74,368 KB
testcase_11 AC 75 ms
76,288 KB
権限があれば一括ダウンロードができます

ソースコード

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 + 10 ** (-12)) + int(r ** 0.5 / 2 ** 0.5 + 10 ** (-12))
    ans2 = int(l ** 0.5 + 10 ** (-12)) + int(l ** 0.5 / 2 ** 0.5 + 10 ** (-12))
    print((ans1 + ans2) % 2)

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