結果

問題 No.407 鴨等素数間隔列の数え上げ
ユーザー syunsukesyunsuke
提出日時 2019-09-18 23:07:41
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 393 bytes
コンパイル時間 284 ms
コンパイル使用メモリ 87,176 KB
実行使用メモリ 94,532 KB
最終ジャッジ日時 2023-09-24 21:06:09
合計ジャッジ時間 7,081 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 99 ms
92,152 KB
testcase_01 AC 99 ms
91,752 KB
testcase_02 AC 99 ms
91,840 KB
testcase_03 AC 147 ms
92,364 KB
testcase_04 AC 99 ms
91,920 KB
testcase_05 RE -
testcase_06 RE -
testcase_07 AC 95 ms
91,772 KB
testcase_08 AC 96 ms
91,768 KB
testcase_09 AC 97 ms
92,084 KB
testcase_10 AC 124 ms
92,580 KB
testcase_11 AC 97 ms
92,072 KB
testcase_12 AC 137 ms
92,560 KB
testcase_13 AC 138 ms
92,588 KB
testcase_14 AC 139 ms
92,416 KB
testcase_15 AC 126 ms
91,988 KB
testcase_16 AC 134 ms
92,576 KB
testcase_17 AC 138 ms
92,596 KB
testcase_18 AC 137 ms
92,476 KB
testcase_19 AC 146 ms
92,520 KB
testcase_20 RE -
testcase_21 AC 150 ms
92,604 KB
testcase_22 AC 144 ms
92,444 KB
testcase_23 AC 167 ms
91,688 KB
testcase_24 RE -
testcase_25 RE -
testcase_26 RE -
testcase_27 AC 138 ms
92,344 KB
testcase_28 RE -
testcase_29 RE -
testcase_30 AC 145 ms
92,452 KB
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