結果

問題 No.677 10^Nの約数
ユーザー DrqYutoDrqYuto
提出日時 2018-12-03 16:47:30
言語 Ruby
(3.3.0)
結果
AC  
実行時間 95 ms / 2,000 ms
コード長 347 bytes
コンパイル時間 44 ms
コンパイル使用メモリ 11,416 KB
実行使用メモリ 15,540 KB
最終ジャッジ日時 2023-09-13 21:11:29
合計ジャッジ時間 3,152 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 92 ms
15,152 KB
testcase_01 AC 95 ms
15,280 KB
testcase_02 AC 94 ms
15,204 KB
testcase_03 AC 94 ms
15,452 KB
testcase_04 AC 93 ms
15,340 KB
testcase_05 AC 93 ms
15,156 KB
testcase_06 AC 94 ms
15,072 KB
testcase_07 AC 95 ms
15,540 KB
testcase_08 AC 92 ms
15,220 KB
testcase_09 AC 94 ms
15,472 KB
testcase_10 AC 94 ms
15,084 KB
testcase_11 AC 92 ms
15,380 KB
testcase_12 AC 93 ms
15,364 KB
testcase_13 AC 92 ms
15,416 KB
testcase_14 AC 93 ms
15,132 KB
testcase_15 AC 93 ms
15,480 KB
testcase_16 AC 93 ms
15,484 KB
testcase_17 AC 94 ms
15,388 KB
testcase_18 AC 94 ms
15,280 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n=gets.to_i

require 'prime'

class Integer
  def my_divisor_list2
    return [1] if self == 1
    Prime.prime_division(self).map do |e|
      Array.new(e[1]+1).map.with_index do |element, i|
        e[0]**i
      end
    end.inject{|p,q| p.product(q)}.map do |a|
      [a].flatten.inject(&:*)
    end.sort
  end
end

puts (10**n).my_divisor_list2
0