結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー BurdenBurden
提出日時 2016-12-30 16:11:23
言語 Scala(Beta)
(3.4.0)
結果
AC  
実行時間 902 ms / 2,000 ms
コード長 393 bytes
コンパイル時間 9,914 ms
コンパイル使用メモリ 235,936 KB
実行使用メモリ 61,652 KB
最終ジャッジ日時 2023-09-12 09:27:52
合計ジャッジ時間 24,092 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 880 ms
61,472 KB
testcase_01 AC 887 ms
61,484 KB
testcase_02 AC 892 ms
61,360 KB
testcase_03 AC 887 ms
61,464 KB
testcase_04 AC 878 ms
61,340 KB
testcase_05 AC 888 ms
61,284 KB
testcase_06 AC 900 ms
61,420 KB
testcase_07 AC 899 ms
61,324 KB
testcase_08 AC 891 ms
61,336 KB
testcase_09 AC 890 ms
61,372 KB
testcase_10 AC 894 ms
61,412 KB
testcase_11 AC 887 ms
61,652 KB
testcase_12 AC 884 ms
61,348 KB
testcase_13 AC 883 ms
61,396 KB
testcase_14 AC 886 ms
61,628 KB
testcase_15 AC 902 ms
61,644 KB
testcase_16 AC 894 ms
61,576 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import scala.io.StdIn.readLine
import scala.util.matching.Regex

object RainSnow446 {
  def main(args:Array[String]): Unit ={
    def isNumContain(str:String) =
      str.matches("""^[1-9]+[0-9]*|0""")
    val a = readLine()
    val b = readLine()
  
    if(isNumContain(a) && isNumContain(b) && (a.toInt <= 12345) && (b.toInt <= 12345))
      println("OK")
    else
      println("NG")
  }
}
0