結果

問題 No.278 連続する整数の和(2)
ユーザー mmmpppmmmppp
提出日時 2017-03-07 16:17:20
言語 Ruby
(3.3.0)
結果
AC  
実行時間 355 ms / 2,000 ms
コード長 72 bytes
コンパイル時間 117 ms
コンパイル使用メモリ 11,396 KB
実行使用メモリ 25,712 KB
最終ジャッジ日時 2023-08-24 22:49:06
合計ジャッジ時間 4,463 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
15,652 KB
testcase_01 AC 78 ms
15,104 KB
testcase_02 AC 311 ms
23,956 KB
testcase_03 AC 79 ms
15,596 KB
testcase_04 AC 78 ms
15,604 KB
testcase_05 AC 83 ms
15,748 KB
testcase_06 AC 85 ms
15,720 KB
testcase_07 AC 88 ms
15,896 KB
testcase_08 AC 294 ms
23,416 KB
testcase_09 AC 293 ms
23,576 KB
testcase_10 AC 355 ms
25,712 KB
testcase_11 AC 287 ms
23,296 KB
testcase_12 AC 79 ms
15,028 KB
testcase_13 AC 254 ms
22,004 KB
testcase_14 AC 217 ms
20,736 KB
testcase_15 AC 232 ms
21,200 KB
testcase_16 AC 197 ms
19,892 KB
testcase_17 AC 298 ms
23,736 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n=gets.to_i;n>>=1-n%2;p (1..a=n**0.5).map{|k|n%k<1?a==k ?k: k+n/k:0}.sum
0