結果

問題 No.371 ぼく悪いプライムじゃないよ
ユーザー cielciel
提出日時 2016-05-15 23:29:29
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 259 bytes
コンパイル時間 70 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 12,800 KB
最終ジャッジ日時 2024-04-15 22:15:45
合計ジャッジ時間 7,787 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 114 ms
12,288 KB
testcase_01 AC 110 ms
12,416 KB
testcase_02 AC 111 ms
12,416 KB
testcase_03 WA -
testcase_04 AC 114 ms
12,416 KB
testcase_05 AC 110 ms
12,416 KB
testcase_06 AC 111 ms
12,288 KB
testcase_07 AC 116 ms
12,416 KB
testcase_08 AC 113 ms
12,416 KB
testcase_09 AC 115 ms
12,288 KB
testcase_10 AC 115 ms
12,288 KB
testcase_11 AC 112 ms
12,416 KB
testcase_12 AC 116 ms
12,288 KB
testcase_13 AC 115 ms
12,416 KB
testcase_14 AC 115 ms
12,288 KB
testcase_15 AC 114 ms
12,416 KB
testcase_16 AC 112 ms
12,288 KB
testcase_17 AC 113 ms
12,160 KB
testcase_18 AC 114 ms
12,416 KB
testcase_19 AC 116 ms
12,288 KB
testcase_20 AC 111 ms
12,416 KB
testcase_21 AC 114 ms
12,416 KB
testcase_22 AC 125 ms
12,416 KB
testcase_23 AC 117 ms
12,672 KB
testcase_24 AC 124 ms
12,672 KB
testcase_25 AC 143 ms
12,416 KB
testcase_26 WA -
testcase_27 AC 123 ms
12,544 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 169 ms
12,672 KB
testcase_31 AC 132 ms
12,800 KB
testcase_32 AC 134 ms
12,800 KB
testcase_33 AC 141 ms
12,416 KB
testcase_34 AC 142 ms
12,672 KB
testcase_35 AC 146 ms
12,544 KB
testcase_36 AC 133 ms
12,544 KB
testcase_37 AC 160 ms
12,672 KB
testcase_38 AC 131 ms
12,416 KB
testcase_39 AC 185 ms
12,672 KB
testcase_40 AC 175 ms
12,544 KB
testcase_41 AC 199 ms
12,800 KB
testcase_42 AC 140 ms
12,672 KB
testcase_43 WA -
testcase_44 WA -
testcase_45 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

require 'prime'
l,h=gets.split.map(&:to_i)
r=0;v=nil
j=Math.sqrt(h).to_i+1
while !v||j>=v
	j-=1
	next if h/j*j<l || !j.prime?
	(h/j).downto(j){|i|
		break if i<l/j
		t=(i*j).prime_division[0][0]
		if !v || v<t || (v==t&&r<i*j)
			v=t
			r=i*j
		end
	}
end
p r
0