結果

問題 No.293 4>7の世界
ユーザー 5h0t4r05h0t4r0
提出日時 2015-11-02 16:21:49
言語 Scala(Beta)
(3.4.0)
結果
WA  
実行時間 -
コード長 370 bytes
コンパイル時間 7,974 ms
コンパイル使用メモリ 246,512 KB
実行使用メモリ 64,208 KB
最終ジャッジ日時 2023-09-11 14:13:24
合計ジャッジ時間 32,165 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 915 ms
62,796 KB
testcase_01 AC 927 ms
62,908 KB
testcase_02 AC 924 ms
62,908 KB
testcase_03 WA -
testcase_04 AC 955 ms
62,936 KB
testcase_05 WA -
testcase_06 AC 908 ms
63,028 KB
testcase_07 AC 904 ms
63,204 KB
testcase_08 AC 932 ms
62,680 KB
testcase_09 WA -
testcase_10 AC 928 ms
62,892 KB
testcase_11 AC 909 ms
62,728 KB
testcase_12 AC 936 ms
63,044 KB
testcase_13 AC 919 ms
62,956 KB
testcase_14 AC 899 ms
63,276 KB
testcase_15 WA -
testcase_16 AC 906 ms
62,788 KB
testcase_17 AC 909 ms
63,972 KB
testcase_18 AC 916 ms
62,748 KB
testcase_19 AC 921 ms
63,008 KB
testcase_20 AC 942 ms
63,168 KB
testcase_21 AC 920 ms
62,980 KB
testcase_22 AC 903 ms
62,892 KB
testcase_23 AC 915 ms
63,108 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

object Yuki293 extends App{
  val input = new java.util.Scanner(System.in)
  val a = input.next
  val b = input.next

  def convert(s :String) :String = s.map{ c => 
   c match {
    case '7' => '4'
    case '4' => '7'
    case x   => x
   }
  }.mkString

  val ai = convert(a).toInt
  val bi = convert(b).toInt

  val result = if(ai >= bi) a else b

  println(result)
}
0