結果

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

ソースコード

diff #
raw source code

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