結果
問題 | No.537 ユーザーID |
ユーザー |
![]() |
提出日時 | 2019-01-19 22:51:38 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 719 ms / 2,000 ms |
コード長 | 383 bytes |
コンパイル時間 | 42 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 12,928 KB |
最終ジャッジ日時 | 2024-07-18 10:46:59 |
合計ジャッジ時間 | 6,870 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 32 |
コンパイルメッセージ
Syntax OK
ソースコード
def yakusu(n)res = [](1..n**0.5).each do |i|if n % i == 0res << [i,n / i]endendresendn = gets.chomp.to_ires = []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)endif res.length == 0puts 1elseputs res.lengthend