結果

問題 No.371 ぼく悪いプライムじゃないよ
ユーザー hogeover30hogeover30
提出日時 2016-09-21 07:51:31
言語 Ruby
(3.3.0)
結果
AC  
実行時間 217 ms / 1,000 ms
コード長 143 bytes
コンパイル時間 57 ms
コンパイル使用メモリ 11,248 KB
実行使用メモリ 16,216 KB
最終ジャッジ日時 2023-08-29 01:10:55
合計ジャッジ時間 6,842 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 96 ms
15,752 KB
testcase_01 AC 96 ms
15,660 KB
testcase_02 AC 93 ms
15,564 KB
testcase_03 AC 93 ms
15,720 KB
testcase_04 AC 94 ms
15,660 KB
testcase_05 AC 93 ms
15,684 KB
testcase_06 AC 97 ms
15,488 KB
testcase_07 AC 95 ms
15,568 KB
testcase_08 AC 95 ms
15,572 KB
testcase_09 AC 94 ms
15,576 KB
testcase_10 AC 95 ms
15,592 KB
testcase_11 AC 94 ms
15,660 KB
testcase_12 AC 94 ms
15,648 KB
testcase_13 AC 94 ms
15,660 KB
testcase_14 AC 92 ms
15,712 KB
testcase_15 AC 94 ms
15,656 KB
testcase_16 AC 95 ms
15,696 KB
testcase_17 AC 95 ms
15,684 KB
testcase_18 AC 93 ms
15,540 KB
testcase_19 AC 94 ms
15,544 KB
testcase_20 AC 94 ms
15,576 KB
testcase_21 AC 93 ms
15,684 KB
testcase_22 AC 97 ms
15,892 KB
testcase_23 AC 96 ms
15,756 KB
testcase_24 AC 117 ms
16,116 KB
testcase_25 AC 119 ms
15,916 KB
testcase_26 AC 120 ms
16,184 KB
testcase_27 AC 112 ms
16,124 KB
testcase_28 AC 118 ms
15,996 KB
testcase_29 AC 217 ms
16,020 KB
testcase_30 AC 121 ms
16,012 KB
testcase_31 AC 128 ms
15,916 KB
testcase_32 AC 124 ms
16,156 KB
testcase_33 AC 125 ms
15,960 KB
testcase_34 AC 131 ms
16,056 KB
testcase_35 AC 128 ms
16,216 KB
testcase_36 AC 122 ms
16,192 KB
testcase_37 AC 125 ms
16,084 KB
testcase_38 AC 124 ms
15,916 KB
testcase_39 AC 119 ms
16,120 KB
testcase_40 AC 121 ms
16,140 KB
testcase_41 AC 115 ms
15,916 KB
testcase_42 AC 112 ms
16,068 KB
testcase_43 AC 142 ms
16,068 KB
testcase_44 AC 120 ms
15,920 KB
testcase_45 AC 94 ms
15,456 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

require'prime'
l,h=gets.split.map &:to_i
a=Prime.each(h**0.5).to_a.reverse
a.map{|x|(h/x*x).step(l,-x){|t|(p t;exit)if !a.any?{|q|q<x&&t%q<1}}}
0