結果

問題 No.537 ユーザーID
コンテスト
ユーザー neko_the_shadow
提出日時 2018-12-05 23:56:21
言語 Scala(Beta)
(3.8.1)
コンパイル:
scalac _filename_
実行:
java -cp .:/home/linuxbrew/.linuxbrew/Cellar/scala/3.8.1/libexec/maven2/org/scala-lang/scala3-library_3/3.8.1/scala3-library_3-3.8.1.jar:/home/linuxbrew/.linuxbrew/Cellar/scala/3.8.1/libexec/maven2/org/scala-lang/scala-library/3.8.1/scala-library-3.8.1.jar _class_
結果
AC  
実行時間 579 ms / 2,000 ms
コード長 272 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 10,809 ms
コンパイル使用メモリ 269,440 KB
実行使用メモリ 65,812 KB
最終ジャッジ日時 2026-03-09 16:30:56
合計ジャッジ時間 27,950 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 32
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

object Q537 {
  def main(args: Array[String]): Unit = {
    val n = io.StdIn.readLine().toLong
    val answer = (1 to math.sqrt(n).toInt).filter(n % _ == 0).flatMap(x => {
      val y = n / x
      Seq(s"${x}${y}", s"${y}${x}")
    }).toSet.size
    println(answer)
  }
}
0