結果

問題 No.371 ぼく悪いプライムじゃないよ
ユーザー TawaraTawara
提出日時 2016-07-10 19:12:12
言語 Python2
(2.7.18)
結果
TLE  
実行時間 -
コード長 251 bytes
コンパイル時間 355 ms
コンパイル使用メモリ 6,784 KB
実行使用メモリ 440,876 KB
最終ジャッジ日時 2024-04-21 12:05:45
合計ジャッジ時間 5,346 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
11,776 KB
testcase_01 AC 13 ms
6,400 KB
testcase_02 AC 13 ms
6,272 KB
testcase_03 AC 13 ms
6,272 KB
testcase_04 AC 13 ms
6,272 KB
testcase_05 AC 13 ms
6,272 KB
testcase_06 AC 13 ms
6,400 KB
testcase_07 AC 13 ms
6,400 KB
testcase_08 AC 13 ms
6,400 KB
testcase_09 AC 13 ms
6,272 KB
testcase_10 AC 13 ms
6,272 KB
testcase_11 AC 13 ms
6,272 KB
testcase_12 AC 13 ms
6,144 KB
testcase_13 AC 21 ms
7,168 KB
testcase_14 AC 20 ms
7,168 KB
testcase_15 AC 21 ms
7,168 KB
testcase_16 AC 20 ms
7,040 KB
testcase_17 AC 13 ms
6,272 KB
testcase_18 AC 13 ms
6,272 KB
testcase_19 AC 13 ms
6,400 KB
testcase_20 AC 743 ms
72,244 KB
testcase_21 AC 719 ms
72,120 KB
testcase_22 TLE -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
testcase_45 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import sqrt
L,H = map(int,raw_input().split())
comp = set()
ub = int(sqrt(H))+1
ans = 4
for p in xrange(2,ub):
	if p in comp:
		continue
	for c in xrange(p*2,H+1,p):
		if c in comp:
			continue
		comp.add(c)
		if c >= L:
			ans = c
print ans
0