結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 91 ms
15,212 KB
testcase_01 AC 89 ms
15,292 KB
testcase_02 AC 199 ms
15,416 KB
testcase_03 AC 95 ms
15,304 KB
testcase_04 AC 89 ms
15,316 KB
testcase_05 AC 92 ms
15,216 KB
testcase_06 AC 91 ms
15,232 KB
testcase_07 AC 93 ms
15,240 KB
testcase_08 AC 91 ms
15,392 KB
testcase_09 AC 90 ms
15,220 KB
testcase_10 AC 91 ms
15,212 KB
testcase_11 AC 102 ms
15,520 KB
testcase_12 AC 89 ms
15,320 KB
testcase_13 AC 164 ms
15,524 KB
testcase_14 AC 97 ms
15,544 KB
testcase_15 AC 131 ms
15,360 KB
testcase_16 AC 100 ms
15,528 KB
testcase_17 AC 97 ms
15,400 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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