結果

問題 No.407 鴨等素数間隔列の数え上げ
ユーザー syunsukesyunsuke
提出日時 2019-09-18 23:10:03
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 400 bytes
コンパイル時間 622 ms
コンパイル使用メモリ 86,712 KB
実行使用メモリ 96,296 KB
最終ジャッジ日時 2023-09-24 21:17:35
合計ジャッジ時間 8,532 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 149 ms
91,996 KB
testcase_01 AC 149 ms
91,864 KB
testcase_02 AC 152 ms
92,092 KB
testcase_03 AC 153 ms
92,112 KB
testcase_04 AC 158 ms
92,000 KB
testcase_05 AC 157 ms
92,068 KB
testcase_06 AC 149 ms
92,060 KB
testcase_07 AC 146 ms
92,092 KB
testcase_08 AC 145 ms
92,116 KB
testcase_09 AC 151 ms
91,868 KB
testcase_10 AC 154 ms
91,880 KB
testcase_11 AC 154 ms
92,088 KB
testcase_12 AC 161 ms
92,020 KB
testcase_13 AC 160 ms
92,012 KB
testcase_14 AC 158 ms
91,824 KB
testcase_15 AC 152 ms
92,104 KB
testcase_16 AC 151 ms
92,000 KB
testcase_17 AC 154 ms
91,996 KB
testcase_18 AC 162 ms
92,096 KB
testcase_19 AC 163 ms
91,896 KB
testcase_20 AC 163 ms
91,924 KB
testcase_21 AC 159 ms
91,860 KB
testcase_22 AC 165 ms
92,104 KB
testcase_23 AC 155 ms
92,000 KB
testcase_24 AC 154 ms
91,796 KB
testcase_25 RE -
testcase_26 AC 161 ms
91,972 KB
testcase_27 AC 169 ms
91,864 KB
testcase_28 AC 156 ms
92,092 KB
testcase_29 AC 163 ms
92,068 KB
testcase_30 AC 159 ms
91,816 KB
testcase_31 AC 171 ms
92,120 KB
testcase_32 AC 164 ms
92,088 KB
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>len(S)-1:
                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