結果

問題 No.1895 Mod 2
ユーザー Goltermann大和Goltermann大和
提出日時 2022-04-08 23:08:35
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 491 bytes
コンパイル時間 352 ms
コンパイル使用メモリ 10,568 KB
実行使用メモリ 17,244 KB
最終ジャッジ日時 2023-08-19 01:43:24
合計ジャッジ時間 6,573 ms
ジャッジサーバーID
(参考情報)
judge10 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

t = int(input())

def divisor(n):
    sq = n**0.5
    border = int(sq)
    table = []
    bigs = []
    for small in range(1, border+1):
        if n%small == 0:
            table.append(small)
            big = n//small
            bigs.append(big)
    if border == sq:#nが平方数
        bigs.pop()
    table += reversed(bigs)
    return table

for i in range(t):
    ans = 0
    l,r = map(int,input().split())
    for j in range(l,r+1):
        ans += sum(divisor(j))
    print(ans%2)
0