結果

問題 No.407 鴨等素数間隔列の数え上げ
ユーザー wotsushiwotsushi
提出日時 2017-03-26 12:08:23
言語 Ruby
(3.3.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 136 bytes
コンパイル時間 37 ms
コンパイル使用メモリ 11,352 KB
実行使用メモリ 29,312 KB
最終ジャッジ日時 2023-09-20 10:58:02
合計ジャッジ時間 8,634 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 88 ms
15,196 KB
testcase_01 AC 88 ms
15,284 KB
testcase_02 AC 90 ms
15,292 KB
testcase_03 AC 128 ms
16,268 KB
testcase_04 AC 90 ms
15,100 KB
testcase_05 AC 91 ms
15,204 KB
testcase_06 AC 91 ms
15,196 KB
testcase_07 AC 90 ms
15,236 KB
testcase_08 AC 89 ms
15,236 KB
testcase_09 AC 91 ms
15,296 KB
testcase_10 AC 89 ms
15,100 KB
testcase_11 AC 90 ms
15,392 KB
testcase_12 AC 89 ms
15,112 KB
testcase_13 AC 89 ms
15,348 KB
testcase_14 AC 89 ms
15,348 KB
testcase_15 AC 91 ms
15,188 KB
testcase_16 AC 88 ms
15,356 KB
testcase_17 AC 88 ms
15,208 KB
testcase_18 AC 90 ms
15,288 KB
testcase_19 AC 225 ms
18,228 KB
testcase_20 AC 379 ms
21,108 KB
testcase_21 AC 87 ms
15,104 KB
testcase_22 AC 87 ms
15,144 KB
testcase_23 AC 88 ms
15,284 KB
testcase_24 AC 88 ms
15,184 KB
testcase_25 AC 549 ms
23,652 KB
testcase_26 AC 88 ms
15,204 KB
testcase_27 AC 87 ms
15,144 KB
testcase_28 AC 88 ms
15,344 KB
testcase_29 AC 88 ms
15,204 KB
testcase_30 AC 90 ms
15,344 KB
testcase_31 AC 91 ms
15,144 KB
testcase_32 AC 372 ms
20,880 KB
testcase_33 TLE -
testcase_34 TLE -
testcase_35 AC 549 ms
23,500 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

require 'prime'

N, L = gets.split.map(&:to_i)
ans = Prime.each((L + 1) / (N - 1)).map {|p| L + 1 - p * (N - 1)}.inject(0, :+)
puts ans
0