結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,704 KB
testcase_01 AC 119 ms
55,664 KB
testcase_02 AC 121 ms
55,860 KB
testcase_03 AC 123 ms
55,576 KB
testcase_04 AC 118 ms
55,820 KB
testcase_05 AC 118 ms
55,580 KB
testcase_06 AC 120 ms
56,148 KB
testcase_07 WA -
testcase_08 AC 118 ms
55,944 KB
testcase_09 WA -
testcase_10 AC 121 ms
55,824 KB
testcase_11 AC 121 ms
56,052 KB
testcase_12 AC 120 ms
55,472 KB
testcase_13 AC 121 ms
55,488 KB
testcase_14 AC 121 ms
55,684 KB
testcase_15 AC 126 ms
55,176 KB
testcase_16 AC 123 ms
55,460 KB
権限があれば一括ダウンロードができます

ソースコード

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