結果

問題 No.407 鴨等素数間隔列の数え上げ
ユーザー finefine
提出日時 2016-08-05 22:39:52
言語 Ruby
(3.3.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 126 bytes
コンパイル時間 576 ms
コンパイル使用メモリ 11,276 KB
実行使用メモリ 27,476 KB
最終ジャッジ日時 2023-08-22 02:43:27
合計ジャッジ時間 9,711 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 93 ms
15,148 KB
testcase_01 AC 92 ms
15,104 KB
testcase_02 AC 92 ms
15,096 KB
testcase_03 AC 130 ms
15,924 KB
testcase_04 AC 93 ms
15,100 KB
testcase_05 AC 93 ms
15,224 KB
testcase_06 AC 93 ms
15,352 KB
testcase_07 AC 94 ms
15,408 KB
testcase_08 AC 94 ms
15,096 KB
testcase_09 AC 94 ms
15,332 KB
testcase_10 AC 94 ms
15,364 KB
testcase_11 AC 92 ms
15,232 KB
testcase_12 AC 93 ms
15,212 KB
testcase_13 AC 94 ms
15,408 KB
testcase_14 AC 94 ms
15,188 KB
testcase_15 AC 95 ms
15,296 KB
testcase_16 AC 95 ms
15,360 KB
testcase_17 AC 94 ms
15,276 KB
testcase_18 AC 92 ms
15,244 KB
testcase_19 AC 227 ms
18,156 KB
testcase_20 AC 373 ms
20,592 KB
testcase_21 AC 95 ms
15,404 KB
testcase_22 AC 92 ms
15,092 KB
testcase_23 AC 93 ms
15,204 KB
testcase_24 AC 92 ms
15,352 KB
testcase_25 AC 548 ms
22,644 KB
testcase_26 AC 94 ms
15,352 KB
testcase_27 AC 96 ms
15,220 KB
testcase_28 AC 95 ms
15,220 KB
testcase_29 AC 102 ms
15,352 KB
testcase_30 AC 95 ms
15,240 KB
testcase_31 AC 94 ms
15,352 KB
testcase_32 AC 367 ms
20,408 KB
testcase_33 TLE -
testcase_34 TLE -
testcase_35 AC 544 ms
22,640 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

require 'prime'

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