結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー HujiLeeHujiLee
提出日時 2016-11-26 00:32:54
言語 Scala(Beta)
(3.4.0)
結果
WA  
実行時間 -
コード長 569 bytes
コンパイル時間 8,201 ms
コンパイル使用メモリ 247,256 KB
実行使用メモリ 62,412 KB
最終ジャッジ日時 2023-09-12 07:38:54
合計ジャッジ時間 25,534 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 925 ms
61,676 KB
testcase_01 AC 917 ms
61,860 KB
testcase_02 AC 910 ms
61,432 KB
testcase_03 WA -
testcase_04 AC 922 ms
61,680 KB
testcase_05 AC 921 ms
61,588 KB
testcase_06 AC 915 ms
61,712 KB
testcase_07 AC 917 ms
61,488 KB
testcase_08 AC 929 ms
61,592 KB
testcase_09 AC 909 ms
61,580 KB
testcase_10 AC 928 ms
62,020 KB
testcase_11 AC 915 ms
61,532 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import scala.io.StdIn

/**
  * Created by Administrator on 2016/11/25 0025.
  */
object Main extends App {
  def ng(): Unit = {
    println("NG")
  }

  def ok(): Unit = {
    println("OK")
  }

  try {
    var A = StdIn.readLine()
    var B = StdIn.readLine()
    if (A.charAt(0) == '0' || B.charAt(0) == '0') {
      throw new Exception("leading zero")
    }
    var (a, b) = (A.toInt, B.toInt)
    if (math.max(a, b) > 12345) {
      throw new Exception("> 12345")
    }

  } catch {
    case ex: Exception => {
      Console.err.println(ex)
      ng()
    }
  }


}
0