結果

問題 No.278 連続する整数の和(2)
ユーザー syarosyaro
提出日時 2016-02-22 23:06:19
言語 Ruby
(3.2.2)
結果
AC  
実行時間 299 ms / 2,000 ms
コード長 76 bytes
コンパイル時間 544 ms
コンパイル使用メモリ 11,376 KB
実行使用メモリ 15,612 KB
最終ジャッジ日時 2023-08-24 22:46:55
合計ジャッジ時間 4,120 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
15,612 KB
testcase_01 AC 82 ms
15,056 KB
testcase_02 AC 255 ms
15,612 KB
testcase_03 AC 81 ms
15,360 KB
testcase_04 AC 79 ms
15,548 KB
testcase_05 AC 83 ms
15,432 KB
testcase_06 AC 85 ms
15,292 KB
testcase_07 AC 85 ms
15,568 KB
testcase_08 AC 243 ms
15,448 KB
testcase_09 AC 244 ms
15,592 KB
testcase_10 AC 299 ms
15,548 KB
testcase_11 AC 239 ms
15,412 KB
testcase_12 AC 79 ms
15,108 KB
testcase_13 AC 213 ms
15,416 KB
testcase_14 AC 187 ms
15,584 KB
testcase_15 AC 196 ms
15,424 KB
testcase_16 AC 169 ms
15,436 KB
testcase_17 AC 248 ms
15,304 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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