結果

問題 No.537 ユーザーID
ユーザー object1234object1234
提出日時 2019-01-19 22:46:16
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 335 bytes
コンパイル時間 365 ms
コンパイル使用メモリ 11,384 KB
実行使用メモリ 19,644 KB
最終ジャッジ日時 2023-09-25 13:36:35
合計ジャッジ時間 5,905 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
19,644 KB
testcase_01 AC 81 ms
15,084 KB
testcase_02 AC 79 ms
15,216 KB
testcase_03 AC 79 ms
15,088 KB
testcase_04 AC 79 ms
15,352 KB
testcase_05 AC 79 ms
15,260 KB
testcase_06 AC 83 ms
15,140 KB
testcase_07 AC 79 ms
15,348 KB
testcase_08 AC 79 ms
15,036 KB
testcase_09 WA -
testcase_10 AC 80 ms
15,356 KB
testcase_11 AC 78 ms
15,264 KB
testcase_12 AC 78 ms
15,036 KB
testcase_13 AC 79 ms
15,124 KB
testcase_14 AC 79 ms
15,184 KB
testcase_15 AC 80 ms
15,192 KB
testcase_16 AC 80 ms
15,264 KB
testcase_17 AC 81 ms
15,244 KB
testcase_18 TLE -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

def yakusu(n)
    res = []
    (1..n*0.5).each do |i|
        if n % i == 0
          res << [i,n / i]
        end
    end
    res
end

n = gets.chomp.to_i
res = []
yakusu(n).each do |k|
    s1 = "#{k[0]}#{k[1]}"
    s2 = "#{k[1]}#{k[0]}"
    res << s1 if not res.include?(s1)
    res << s2 if not res.include?(s2)
end

puts res.length
0