結果

問題 No.278 連続する整数の和(2)
ユーザー mmmpppmmmppp
提出日時 2017-03-07 15:06:00
言語 Ruby
(3.2.2)
結果
AC  
実行時間 199 ms / 2,000 ms
コード長 95 bytes
コンパイル時間 59 ms
コンパイル使用メモリ 11,408 KB
実行使用メモリ 15,560 KB
最終ジャッジ日時 2023-08-24 22:48:49
合計ジャッジ時間 2,941 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 95 ms
15,408 KB
testcase_01 AC 89 ms
15,276 KB
testcase_02 AC 199 ms
15,376 KB
testcase_03 AC 94 ms
15,460 KB
testcase_04 AC 89 ms
15,160 KB
testcase_05 AC 90 ms
15,180 KB
testcase_06 AC 90 ms
15,292 KB
testcase_07 AC 90 ms
15,096 KB
testcase_08 AC 89 ms
15,304 KB
testcase_09 AC 90 ms
15,212 KB
testcase_10 AC 90 ms
15,132 KB
testcase_11 AC 100 ms
15,336 KB
testcase_12 AC 88 ms
15,208 KB
testcase_13 AC 164 ms
15,316 KB
testcase_14 AC 97 ms
15,380 KB
testcase_15 AC 130 ms
15,560 KB
testcase_16 AC 101 ms
15,552 KB
testcase_17 AC 96 ms
15,500 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

require'prime'
n=gets.to_i
p (n&1<1?n/2:n).prime_division.map{|a,b|~-a**(b+1)/a-=1}.reduce 1,:*
0