結果

問題 No.1895 Mod 2
ユーザー ShirotsumeShirotsume
提出日時 2022-04-03 23:32:48
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 418 bytes
コンパイル時間 210 ms
コンパイル使用メモリ 82,620 KB
実行使用メモリ 76,712 KB
最終ジャッジ日時 2024-05-03 09:07:56
合計ジャッジ時間 2,000 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
53,208 KB
testcase_01 AC 65 ms
75,116 KB
testcase_02 AC 78 ms
76,624 KB
testcase_03 AC 64 ms
74,832 KB
testcase_04 AC 74 ms
76,700 KB
testcase_05 AC 67 ms
76,428 KB
testcase_06 AC 72 ms
76,308 KB
testcase_07 AC 69 ms
76,712 KB
testcase_08 AC 68 ms
76,648 KB
testcase_09 WA -
testcase_10 AC 64 ms
74,848 KB
testcase_11 AC 69 ms
76,620 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 ** (-14)) + int(r ** 0.5 / 2 ** 0.5 + 10 ** (-14))
    ans2 = int(l ** 0.5 + 10 ** (-14)) + int(l ** 0.5 / 2 ** 0.5 + 10 ** (-14))
    print((ans1 + ans2) % 2)

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