結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 91 ms
15,640 KB
testcase_01 AC 95 ms
15,624 KB
testcase_02 AC 89 ms
15,696 KB
testcase_03 AC 89 ms
15,588 KB
testcase_04 AC 91 ms
15,592 KB
testcase_05 AC 90 ms
15,592 KB
testcase_06 AC 88 ms
15,536 KB
testcase_07 AC 90 ms
15,508 KB
testcase_08 AC 87 ms
15,588 KB
testcase_09 AC 89 ms
15,600 KB
testcase_10 AC 89 ms
15,664 KB
testcase_11 AC 89 ms
15,568 KB
testcase_12 AC 92 ms
15,596 KB
testcase_13 AC 92 ms
15,572 KB
testcase_14 AC 91 ms
15,716 KB
testcase_15 AC 92 ms
15,564 KB
testcase_16 AC 92 ms
15,644 KB
testcase_17 AC 93 ms
15,512 KB
testcase_18 AC 91 ms
15,660 KB
testcase_19 AC 89 ms
15,792 KB
testcase_20 AC 91 ms
15,808 KB
testcase_21 AC 90 ms
15,712 KB
testcase_22 AC 91 ms
16,024 KB
testcase_23 AC 92 ms
15,832 KB
testcase_24 AC 113 ms
16,276 KB
testcase_25 AC 112 ms
15,988 KB
testcase_26 AC 113 ms
16,296 KB
testcase_27 AC 106 ms
16,192 KB
testcase_28 AC 114 ms
16,192 KB
testcase_29 AC 218 ms
16,100 KB
testcase_30 AC 118 ms
16,324 KB
testcase_31 AC 118 ms
16,264 KB
testcase_32 AC 115 ms
16,184 KB
testcase_33 AC 114 ms
16,116 KB
testcase_34 AC 123 ms
16,064 KB
testcase_35 AC 122 ms
16,108 KB
testcase_36 AC 115 ms
16,092 KB
testcase_37 AC 116 ms
16,172 KB
testcase_38 AC 121 ms
16,116 KB
testcase_39 AC 113 ms
16,116 KB
testcase_40 AC 115 ms
16,100 KB
testcase_41 AC 113 ms
16,276 KB
testcase_42 AC 108 ms
16,164 KB
testcase_43 AC 139 ms
16,092 KB
testcase_44 AC 117 ms
16,064 KB
testcase_45 AC 90 ms
15,636 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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