結果

問題 No.414 衝動
ユーザー aRacaRac
提出日時 2016-11-30 20:13:02
言語 Scala(Beta)
(3.4.0)
結果
TLE  
実行時間 -
コード長 270 bytes
コンパイル時間 10,976 ms
コンパイル使用メモリ 251,952 KB
実行使用メモリ 64,240 KB
最終ジャッジ日時 2023-09-12 07:47:28
合計ジャッジ時間 24,061 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 966 ms
61,704 KB
testcase_01 AC 886 ms
61,956 KB
testcase_02 AC 894 ms
61,720 KB
testcase_03 AC 982 ms
61,856 KB
testcase_04 AC 997 ms
62,084 KB
testcase_05 TLE -
testcase_06 WA -
testcase_07 AC 892 ms
62,008 KB
testcase_08 WA -
testcase_09 TLE -
testcase_10 TLE -
testcase_11 TLE -
testcase_12 AC 903 ms
61,792 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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