結果

問題 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 ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 9,317 ms
コンパイル使用メモリ 274,880 KB
実行使用メモリ 64,504 KB
最終ジャッジ日時 2026-03-09 14:57:46
合計ジャッジ時間 16,053 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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