結果
問題 |
No.537 ユーザーID
|
ユーザー |
![]() |
提出日時 | 2019-01-19 22:46:16 |
言語 | Ruby (3.4.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 335 bytes |
コンパイル時間 | 38 ms |
コンパイル使用メモリ | 7,680 KB |
実行使用メモリ | 19,232 KB |
最終ジャッジ日時 | 2024-07-18 10:41:35 |
合計ジャッジ時間 | 5,438 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 14 WA * 1 TLE * 1 -- * 16 |
コンパイルメッセージ
Syntax OK
ソースコード
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