結果

問題 No.414 衝動
コンテスト
ユーザー aRac
提出日時 2016-11-30 20:13:02
言語 Scala(Beta)
(3.8.2)
コンパイル:
scalac _filename_
実行:
/usr/bin/scala_run _class_
結果
WA  
実行時間 -
コード長 270 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 6,400 ms
コンパイル使用メモリ 252,080 KB
実行使用メモリ 57,984 KB
最終ジャッジ日時 2026-07-28 13:03:55
合計ジャッジ時間 11,870 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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