結果

問題 No.677 10^Nの約数
ユーザー KisaragiEffectiveKisaragiEffective
提出日時 2020-11-08 21:36:26
言語 Ruby
(3.3.0)
結果
RE  
実行時間 -
コード長 249 bytes
コンパイル時間 49 ms
コンパイル使用メモリ 11,528 KB
実行使用メモリ 15,420 KB
最終ジャッジ日時 2023-09-29 21:43:17
合計ジャッジ時間 2,613 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 91 ms
15,272 KB
testcase_02 AC 86 ms
15,036 KB
testcase_03 AC 87 ms
15,324 KB
testcase_04 AC 86 ms
15,156 KB
testcase_05 AC 91 ms
15,368 KB
testcase_06 AC 86 ms
15,100 KB
testcase_07 AC 86 ms
15,396 KB
testcase_08 AC 87 ms
15,316 KB
testcase_09 AC 87 ms
15,104 KB
testcase_10 AC 86 ms
15,280 KB
testcase_11 AC 87 ms
15,368 KB
testcase_12 AC 86 ms
15,192 KB
testcase_13 AC 86 ms
15,240 KB
testcase_14 AC 86 ms
15,312 KB
testcase_15 AC 86 ms
15,196 KB
testcase_16 AC 87 ms
15,332 KB
testcase_17 AC 87 ms
15,224 KB
testcase_18 AC 86 ms
15,316 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

require "prime"
x = Prime.prime_division(10 ** gets.to_i).map{|x| (0..x[1]).map {|e| x[0] ** e}}
v = x[0].size
puts (0..v).to_a.repeated_permutation(2).to_a.map{|i| [x[0][i[0]], x[1][i[1]]]}.filter {|w| w.none?(&:nil?) }.map{|p| p.reduce(:*)}.sort

0