結果
問題 |
No.446 ゆきこーだーの雨と雪 (1)
|
ユーザー |
|
提出日時 | 2016-11-26 00:32:54 |
言語 | Scala(Beta) (3.6.2) |
結果 |
WA
|
実行時間 | - |
コード長 | 569 bytes |
コンパイル時間 | 8,398 ms |
コンパイル使用メモリ | 255,336 KB |
実行使用メモリ | 62,576 KB |
最終ジャッジ日時 | 2024-06-29 20:34:03 |
合計ジャッジ時間 | 24,750 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 WA * 1 |
other | AC * 8 WA * 5 |
ソースコード
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() } } }