結果

問題 No.407 鴨等素数間隔列の数え上げ
ユーザー tookunn_1213tookunn_1213
提出日時 2016-08-06 00:15:36
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 323 ms / 1,000 ms
コード長 425 bytes
コンパイル時間 443 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 133,888 KB
最終ジャッジ日時 2024-04-24 15:38:06
合計ジャッジ時間 12,589 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 305 ms
132,736 KB
testcase_01 AC 308 ms
132,864 KB
testcase_02 AC 302 ms
132,736 KB
testcase_03 AC 307 ms
133,888 KB
testcase_04 AC 300 ms
132,480 KB
testcase_05 AC 300 ms
132,864 KB
testcase_06 AC 300 ms
132,864 KB
testcase_07 AC 308 ms
132,736 KB
testcase_08 AC 299 ms
132,992 KB
testcase_09 AC 308 ms
132,608 KB
testcase_10 AC 309 ms
132,736 KB
testcase_11 AC 294 ms
132,864 KB
testcase_12 AC 302 ms
132,736 KB
testcase_13 AC 314 ms
132,736 KB
testcase_14 AC 303 ms
132,864 KB
testcase_15 AC 299 ms
132,736 KB
testcase_16 AC 302 ms
132,992 KB
testcase_17 AC 294 ms
132,736 KB
testcase_18 AC 301 ms
132,736 KB
testcase_19 AC 300 ms
133,888 KB
testcase_20 AC 294 ms
133,504 KB
testcase_21 AC 296 ms
132,736 KB
testcase_22 AC 300 ms
132,992 KB
testcase_23 AC 294 ms
132,736 KB
testcase_24 AC 296 ms
133,248 KB
testcase_25 AC 314 ms
133,632 KB
testcase_26 AC 312 ms
133,248 KB
testcase_27 AC 293 ms
132,608 KB
testcase_28 AC 317 ms
132,736 KB
testcase_29 AC 323 ms
132,608 KB
testcase_30 AC 312 ms
132,608 KB
testcase_31 AC 309 ms
132,864 KB
testcase_32 AC 306 ms
133,888 KB
testcase_33 AC 308 ms
133,888 KB
testcase_34 AC 318 ms
133,760 KB
testcase_35 AC 315 ms
133,632 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,L = map(int,input().split())
def getPrimes():
	isPrime = [True for i in range(4999999 + 1)]
	isPrime[0] = isPrime[1] = False
	primes = []
	for i in range(2,4999999 + 1):
		if not isPrime[i]:
			continue
		j = 2
		while i * j <= 4999999:
			isPrime[i * j] = False
			j += 1
		primes.append(i)
	return primes
primes = getPrimes()
ans = 0
for p in primes:
	if L < p * (N - 1):
		break
	ans += (L - p * (N - 1)) + 1
print(ans)
0