結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 371 ms
132,992 KB
testcase_01 AC 370 ms
132,736 KB
testcase_02 AC 362 ms
132,608 KB
testcase_03 AC 370 ms
133,680 KB
testcase_04 AC 361 ms
132,864 KB
testcase_05 AC 376 ms
132,736 KB
testcase_06 AC 372 ms
132,864 KB
testcase_07 AC 385 ms
132,608 KB
testcase_08 AC 388 ms
132,864 KB
testcase_09 AC 382 ms
132,736 KB
testcase_10 AC 360 ms
132,608 KB
testcase_11 AC 361 ms
132,608 KB
testcase_12 AC 355 ms
132,736 KB
testcase_13 AC 362 ms
132,608 KB
testcase_14 AC 363 ms
132,864 KB
testcase_15 AC 360 ms
132,608 KB
testcase_16 AC 354 ms
132,864 KB
testcase_17 AC 368 ms
132,608 KB
testcase_18 AC 364 ms
132,992 KB
testcase_19 AC 360 ms
133,632 KB
testcase_20 AC 374 ms
133,760 KB
testcase_21 AC 366 ms
132,736 KB
testcase_22 AC 380 ms
132,864 KB
testcase_23 AC 406 ms
132,736 KB
testcase_24 AC 394 ms
132,864 KB
testcase_25 AC 384 ms
133,504 KB
testcase_26 AC 367 ms
132,608 KB
testcase_27 AC 373 ms
132,608 KB
testcase_28 AC 389 ms
132,864 KB
testcase_29 AC 369 ms
132,608 KB
testcase_30 AC 361 ms
132,608 KB
testcase_31 AC 357 ms
132,864 KB
testcase_32 AC 364 ms
133,760 KB
testcase_33 AC 357 ms
133,632 KB
testcase_34 AC 378 ms
133,632 KB
testcase_35 AC 377 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