結果

問題 No.407 鴨等素数間隔列の数え上げ
ユーザー syunsukesyunsuke
提出日時 2019-09-18 23:07:18
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 393 bytes
コンパイル時間 527 ms
コンパイル使用メモリ 10,732 KB
実行使用メモリ 23,740 KB
最終ジャッジ日時 2023-09-24 21:07:25
合計ジャッジ時間 34,583 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 TLE -
testcase_02 TLE -
testcase_03 TLE -
testcase_04 TLE -
testcase_05 RE -
testcase_06 RE -
testcase_07 TLE -
testcase_08 TLE -
testcase_09 TLE -
testcase_10 TLE -
testcase_11 TLE -
testcase_12 TLE -
testcase_13 TLE -
testcase_14 TLE -
testcase_15 TLE -
testcase_16 TLE -
testcase_17 TLE -
testcase_18 TLE -
testcase_19 TLE -
testcase_20 RE -
testcase_21 TLE -
testcase_22 TLE -
testcase_23 TLE -
testcase_24 RE -
testcase_25 RE -
testcase_26 RE -
testcase_27 TLE -
testcase_28 RE -
testcase_29 RE -
testcase_30 TLE -
testcase_31 RE -
testcase_32 RE -
testcase_33 RE -
testcase_34 RE -
testcase_35 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

N,L=map(int,input().split())

S=[1 for i in range(2*10**6+1)]
S[0]=0
S[1]=0
for i in range(2,2*10**6):
    if S[i]==1:
        for j in range(2,2*10**6):
            if i*j>L:
                break
            else:
                S[i*j]=0
#print(S[:6])
ans=0
for i in range(L):
    if S[i]==1:
        if (N-1)*i<=L:
            ans+=(L-(N-1)*i+1)
        else:
            break
print(ans)
0