結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
15,136 KB
testcase_01 AC 92 ms
15,132 KB
testcase_02 AC 199 ms
15,488 KB
testcase_03 AC 89 ms
15,320 KB
testcase_04 AC 89 ms
15,224 KB
testcase_05 AC 89 ms
15,352 KB
testcase_06 AC 89 ms
15,308 KB
testcase_07 AC 89 ms
15,312 KB
testcase_08 AC 91 ms
15,340 KB
testcase_09 AC 93 ms
15,364 KB
testcase_10 AC 93 ms
15,320 KB
testcase_11 AC 104 ms
15,524 KB
testcase_12 AC 92 ms
15,340 KB
testcase_13 AC 167 ms
15,288 KB
testcase_14 AC 100 ms
15,368 KB
testcase_15 AC 133 ms
15,368 KB
testcase_16 AC 100 ms
15,428 KB
testcase_17 AC 98 ms
15,324 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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