結果

問題 No.1059 素敵な集合
ユーザー Salmonize
提出日時 2020-06-08 19:31:39
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 381 bytes
コンパイル時間 208 ms
コンパイル使用メモリ 12,288 KB
実行使用メモリ 13,696 KB
最終ジャッジ日時 2024-12-26 04:35:47
合計ジャッジ時間 3,045 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 2 WA * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

readline = sys.stdin.readline

ns = lambda: readline().rstrip()
ni = lambda: int(readline().rstrip())
nm = lambda: map(int, readline().split())
nl = lambda: list(map(int, readline().split()))

def solve():
    l, r = nm()
    s = [1]*(r+1)
    for i in range(l, r+1):
        for j in range(i*2, r+1, i):
            s[j] = 0
    print(sum(s[l+1:]))
    return

solve()
0