結果

問題 No.407 鴨等素数間隔列の数え上げ
ユーザー yozayoza
提出日時 2016-08-05 23:28:57
言語 Ruby
(3.3.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 153 bytes
コンパイル時間 155 ms
コンパイル使用メモリ 11,252 KB
実行使用メモリ 27,468 KB
最終ジャッジ日時 2023-08-22 04:16:24
合計ジャッジ時間 8,121 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 92 ms
15,320 KB
testcase_01 AC 88 ms
15,320 KB
testcase_02 AC 89 ms
15,316 KB
testcase_03 AC 121 ms
15,928 KB
testcase_04 AC 86 ms
15,484 KB
testcase_05 AC 88 ms
15,196 KB
testcase_06 AC 87 ms
15,272 KB
testcase_07 AC 88 ms
15,144 KB
testcase_08 AC 87 ms
15,472 KB
testcase_09 AC 87 ms
15,332 KB
testcase_10 AC 87 ms
15,268 KB
testcase_11 AC 87 ms
15,188 KB
testcase_12 AC 86 ms
15,260 KB
testcase_13 AC 88 ms
15,432 KB
testcase_14 AC 88 ms
15,400 KB
testcase_15 AC 88 ms
15,196 KB
testcase_16 AC 88 ms
15,304 KB
testcase_17 AC 86 ms
15,184 KB
testcase_18 AC 87 ms
15,192 KB
testcase_19 AC 220 ms
18,248 KB
testcase_20 AC 360 ms
20,516 KB
testcase_21 AC 87 ms
15,204 KB
testcase_22 AC 86 ms
15,196 KB
testcase_23 AC 86 ms
15,324 KB
testcase_24 AC 87 ms
15,236 KB
testcase_25 AC 534 ms
22,576 KB
testcase_26 AC 88 ms
15,324 KB
testcase_27 AC 87 ms
15,264 KB
testcase_28 AC 87 ms
15,312 KB
testcase_29 AC 86 ms
15,236 KB
testcase_30 AC 87 ms
15,244 KB
testcase_31 AC 87 ms
15,284 KB
testcase_32 AC 356 ms
20,640 KB
testcase_33 TLE -
testcase_34 TLE -
testcase_35 AC 526 ms
22,404 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

require 'prime'

n, l = gets.split.map(&:to_i)
result = 0

Prime.each do |i|
  break if i * (n - 1) > l
  result += l - i * (n - 1) + 1
end

puts result
0