結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー あsdfあsdf
提出日時 2017-04-17 21:00:25
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 579 bytes
コンパイル時間 2,539 ms
コンパイル使用メモリ 72,304 KB
実行使用メモリ 58,056 KB
最終ジャッジ日時 2023-09-26 10:55:21
合計ジャッジ時間 5,580 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
55,988 KB
testcase_01 AC 118 ms
56,236 KB
testcase_02 AC 117 ms
56,020 KB
testcase_03 WA -
testcase_04 AC 120 ms
56,040 KB
testcase_05 AC 119 ms
55,948 KB
testcase_06 AC 120 ms
56,204 KB
testcase_07 WA -
testcase_08 AC 121 ms
56,220 KB
testcase_09 AC 119 ms
55,780 KB
testcase_10 AC 120 ms
56,192 KB
testcase_11 AC 121 ms
55,732 KB
testcase_12 AC 120 ms
56,156 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main {
  public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);
    String cs0 = sc.nextLine();
    String cs1 = sc.nextLine();

    try {
      int a = Integer.parseInt(cs0);
      int b = Integer.parseInt(cs1);
      if (a <= 12345 && b <= 12345 && a <= 0 && b <= 0 &&  Integer.toString(a).length() <= 5 && Integer.toString(b).length() <= 5) {
        System.out.println("OK");
      }else{
        System.out.println("NG");
      }
    } catch (NumberFormatException e) {
      System.out.println("NG");
    }

  }
}
0