結果

問題 No.414 衝動
コンテスト
ユーザー aRac
提出日時 2016-11-30 20:06:41
言語 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_
結果
RE  
実行時間 -
コード長 256 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 6,459 ms
コンパイル使用メモリ 260,116 KB
実行使用メモリ 57,932 KB
最終ジャッジ日時 2026-03-09 14:57:40
合計ジャッジ時間 11,659 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 5 RE * 8
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

object Main {
    def a(n: Int): (Int, Int) = (1 to math.sqrt(n).toInt).filter(n % _ == 0).map(d => (d, n / d)).last
    def main(args: Array[String]) = {
        val ans = a(io.StdIn.readLine.toInt)
        println(ans._1.toString + " " + ans._2)
    }
}
0