結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 90 ms
15,264 KB
testcase_01 AC 90 ms
15,140 KB
testcase_02 AC 201 ms
15,240 KB
testcase_03 AC 90 ms
15,124 KB
testcase_04 AC 91 ms
15,288 KB
testcase_05 AC 91 ms
15,200 KB
testcase_06 AC 90 ms
15,208 KB
testcase_07 AC 91 ms
15,376 KB
testcase_08 AC 90 ms
15,352 KB
testcase_09 AC 90 ms
15,124 KB
testcase_10 AC 92 ms
15,292 KB
testcase_11 AC 103 ms
15,504 KB
testcase_12 AC 90 ms
15,312 KB
testcase_13 AC 164 ms
15,380 KB
testcase_14 AC 98 ms
15,360 KB
testcase_15 AC 133 ms
15,320 KB
testcase_16 AC 101 ms
15,600 KB
testcase_17 AC 98 ms
15,508 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};p s
0