結果

問題 No.293 4>7の世界
ユーザー koba-e964koba-e964
提出日時 2015-12-03 00:45:19
言語 Scala(Beta)
(3.3.1)
結果
AC  
実行時間 979 ms / 2,000 ms
コード長 597 bytes
コンパイル時間 8,030 ms
コンパイル使用メモリ 248,148 KB
実行使用メモリ 63,920 KB
最終ジャッジ日時 2023-09-11 22:02:52
合計ジャッジ時間 33,746 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 972 ms
62,596 KB
testcase_01 AC 966 ms
63,044 KB
testcase_02 AC 973 ms
62,776 KB
testcase_03 AC 965 ms
62,680 KB
testcase_04 AC 967 ms
62,644 KB
testcase_05 AC 943 ms
62,812 KB
testcase_06 AC 944 ms
62,744 KB
testcase_07 AC 960 ms
62,660 KB
testcase_08 AC 969 ms
62,608 KB
testcase_09 AC 962 ms
63,920 KB
testcase_10 AC 972 ms
62,604 KB
testcase_11 AC 975 ms
62,596 KB
testcase_12 AC 961 ms
62,652 KB
testcase_13 AC 958 ms
62,624 KB
testcase_14 AC 965 ms
62,916 KB
testcase_15 AC 978 ms
63,288 KB
testcase_16 AC 978 ms
62,792 KB
testcase_17 AC 962 ms
62,972 KB
testcase_18 AC 964 ms
63,004 KB
testcase_19 AC 977 ms
62,968 KB
testcase_20 AC 964 ms
62,636 KB
testcase_21 AC 979 ms
62,800 KB
testcase_22 AC 955 ms
62,604 KB
testcase_23 AC 964 ms
62,684 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)
def test(a : Long, b: Long) : Boolean = {
if (a / 10 != b / 10) return test(a / 10, b / 10)
val ra = a % 10
val rb = b % 10
if (ra + rb == 11 && ra * rb == 28) {
  return ra > rb
}
return ra < rb
}
val u, v = sc.nextInt
if (test(u, v)) {
println(v)
} else println(u)
}
0