結果

問題 No.278 連続する整数の和(2)
ユーザー cielciel
提出日時 2015-09-04 23:41:43
言語 Ruby
(3.3.0)
結果
AC  
実行時間 201 ms / 2,000 ms
コード長 91 bytes
コンパイル時間 42 ms
コンパイル使用メモリ 11,488 KB
実行使用メモリ 15,540 KB
最終ジャッジ日時 2023-08-24 22:38:37
合計ジャッジ時間 2,917 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 98 ms
15,288 KB
testcase_01 AC 91 ms
15,144 KB
testcase_02 AC 201 ms
15,404 KB
testcase_03 AC 93 ms
15,124 KB
testcase_04 AC 94 ms
15,312 KB
testcase_05 AC 92 ms
15,108 KB
testcase_06 AC 92 ms
15,264 KB
testcase_07 AC 91 ms
15,132 KB
testcase_08 AC 91 ms
15,168 KB
testcase_09 AC 91 ms
15,204 KB
testcase_10 AC 94 ms
15,228 KB
testcase_11 AC 106 ms
15,472 KB
testcase_12 AC 92 ms
15,180 KB
testcase_13 AC 167 ms
15,332 KB
testcase_14 AC 100 ms
15,540 KB
testcase_15 AC 133 ms
15,492 KB
testcase_16 AC 102 ms
15,392 KB
testcase_17 AC 99 ms
15,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

require'prime';n=gets.to_i;s=1;(n>>1-n%2).prime_division.each{|n,p|s*=(n**(p+1)-1)/~-n};p s
0