結果

問題 No.312 置換処理
ユーザー koba-e964koba-e964
提出日時 2015-12-05 01:56:54
言語 Scala(Beta)
(3.4.0)
結果
WA  
実行時間 -
コード長 542 bytes
コンパイル時間 8,482 ms
コンパイル使用メモリ 247,416 KB
実行使用メモリ 63,804 KB
最終ジャッジ日時 2023-09-11 22:13:19
合計ジャッジ時間 53,306 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 962 ms
62,772 KB
testcase_01 WA -
testcase_02 AC 966 ms
62,820 KB
testcase_03 WA -
testcase_04 AC 962 ms
62,780 KB
testcase_05 AC 947 ms
62,768 KB
testcase_06 AC 955 ms
62,720 KB
testcase_07 AC 964 ms
62,824 KB
testcase_08 AC 951 ms
62,908 KB
testcase_09 AC 945 ms
62,852 KB
testcase_10 AC 952 ms
62,868 KB
testcase_11 AC 959 ms
62,772 KB
testcase_12 AC 953 ms
63,064 KB
testcase_13 AC 963 ms
62,684 KB
testcase_14 AC 950 ms
62,880 KB
testcase_15 AC 944 ms
62,884 KB
testcase_16 AC 936 ms
62,716 KB
testcase_17 AC 933 ms
62,724 KB
testcase_18 AC 930 ms
62,712 KB
testcase_19 AC 928 ms
62,664 KB
testcase_20 AC 944 ms
62,644 KB
testcase_21 AC 977 ms
62,732 KB
testcase_22 AC 960 ms
63,172 KB
testcase_23 AC 953 ms
62,768 KB
testcase_24 AC 940 ms
62,688 KB
testcase_25 AC 941 ms
62,940 KB
testcase_26 AC 939 ms
62,840 KB
testcase_27 WA -
testcase_28 AC 952 ms
62,896 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 931 ms
63,604 KB
testcase_32 AC 951 ms
62,848 KB
testcase_33 AC 958 ms
62,720 KB
testcase_34 AC 956 ms
62,904 KB
testcase_35 AC 947 ms
63,200 KB
testcase_36 AC 946 ms
62,664 KB
testcase_37 AC 945 ms
62,796 KB
testcase_38 AC 946 ms
62,976 KB
testcase_39 AC 937 ms
63,664 KB
testcase_40 AC 1,002 ms
62,756 KB
testcase_41 AC 940 ms
62,740 KB
testcase_42 AC 934 ms
62,996 KB
testcase_43 AC 951 ms
62,652 KB
testcase_44 AC 966 ms
62,612 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

/*
 * Reference: http://lizan.asia/blog/2012/12/11/scala-competitive/
 */

object Main extends App {
  import java.{util => ju}
  import scala.annotation._
  import scala.collection._
  import scala.collection.{mutable => mu}
  import scala.collection.JavaConverters._
  import scala.math._
  val sc = new ju.Scanner(System.in)
  @tailrec
  def  calc(t:Long, n : Long) : Long={
    () match {
     case  _ if n % t == 0 => t
      case _ if n < t * t => n
      case _ => calc(t + 1, n)
    }
  }
  val n = sc.nextLong
  println(calc(3, n))
}
0