結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー fal_rndfal_rnd
提出日時 2016-11-18 22:44:47
言語 Java19
(openjdk 21)
結果
AC  
実行時間 122 ms / 2,000 ms
コード長 374 bytes
コンパイル時間 2,968 ms
コンパイル使用メモリ 71,840 KB
実行使用メモリ 56,016 KB
最終ジャッジ日時 2023-08-17 11:15:21
合計ジャッジ時間 6,052 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,864 KB
testcase_01 AC 121 ms
55,656 KB
testcase_02 AC 121 ms
55,696 KB
testcase_03 AC 122 ms
55,908 KB
testcase_04 AC 119 ms
55,896 KB
testcase_05 AC 117 ms
55,584 KB
testcase_06 AC 119 ms
55,772 KB
testcase_07 AC 119 ms
55,724 KB
testcase_08 AC 120 ms
55,672 KB
testcase_09 AC 120 ms
56,016 KB
testcase_10 AC 121 ms
55,748 KB
testcase_11 AC 118 ms
55,180 KB
testcase_12 AC 120 ms
55,620 KB
testcase_13 AC 121 ms
55,736 KB
testcase_14 AC 120 ms
55,584 KB
testcase_15 AC 119 ms
55,680 KB
testcase_16 AC 122 ms
55,956 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
class A{
	static Scanner s = new Scanner(System.in);
	public static void main(String[] args){
		if(check(s.next())&&check(s.next())) {
			System.out.println("OK");
		}else {
			System.out.println("NG");
		}
	}
	static boolean check(String s) {
		if(s.equals("0")||s.matches("[1-9][0-9]*")) {
			return Integer.parseInt(s)<=12345;
		}
		return false;
	}
}
0