結果

問題 No.407 鴨等素数間隔列の数え上げ
ユーザー tookunn_1213tookunn_1213
提出日時 2016-08-06 00:47:40
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 457 bytes
コンパイル時間 88 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 68,992 KB
最終ジャッジ日時 2024-04-24 15:50:54
合計ジャッジ時間 6,049 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
16,000 KB
testcase_01 AC 31 ms
10,752 KB
testcase_02 AC 28 ms
10,624 KB
testcase_03 AC 66 ms
12,160 KB
testcase_04 AC 31 ms
10,624 KB
testcase_05 AC 28 ms
10,624 KB
testcase_06 AC 29 ms
10,624 KB
testcase_07 AC 28 ms
10,624 KB
testcase_08 AC 28 ms
10,752 KB
testcase_09 AC 28 ms
10,624 KB
testcase_10 AC 27 ms
10,624 KB
testcase_11 AC 27 ms
10,752 KB
testcase_12 AC 27 ms
10,752 KB
testcase_13 AC 29 ms
10,624 KB
testcase_14 AC 28 ms
10,752 KB
testcase_15 AC 27 ms
10,752 KB
testcase_16 AC 27 ms
10,752 KB
testcase_17 AC 28 ms
10,752 KB
testcase_18 AC 28 ms
10,752 KB
testcase_19 AC 222 ms
16,384 KB
testcase_20 AC 545 ms
26,880 KB
testcase_21 AC 28 ms
10,624 KB
testcase_22 AC 27 ms
10,752 KB
testcase_23 AC 28 ms
10,624 KB
testcase_24 AC 28 ms
10,752 KB
testcase_25 AC 934 ms
37,504 KB
testcase_26 AC 30 ms
10,624 KB
testcase_27 AC 31 ms
10,752 KB
testcase_28 AC 29 ms
10,752 KB
testcase_29 AC 29 ms
10,624 KB
testcase_30 AC 29 ms
10,624 KB
testcase_31 AC 28 ms
10,624 KB
testcase_32 AC 391 ms
24,192 KB
testcase_33 TLE -
testcase_34 -- -
testcase_35 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

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