結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー fal_rndfal_rnd
提出日時 2016-11-18 22:30:26
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 348 bytes
コンパイル時間 2,098 ms
コンパイル使用メモリ 74,844 KB
実行使用メモリ 41,372 KB
最終ジャッジ日時 2024-05-04 17:46:12
合計ジャッジ時間 4,367 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 113 ms
40,720 KB
testcase_01 AC 102 ms
41,268 KB
testcase_02 AC 114 ms
41,028 KB
testcase_03 AC 112 ms
41,076 KB
testcase_04 AC 97 ms
40,992 KB
testcase_05 AC 110 ms
41,324 KB
testcase_06 WA -
testcase_07 AC 115 ms
41,084 KB
testcase_08 WA -
testcase_09 AC 115 ms
41,292 KB
testcase_10 AC 114 ms
39,956 KB
testcase_11 AC 105 ms
40,460 KB
testcase_12 AC 105 ms
40,756 KB
testcase_13 AC 107 ms
41,292 KB
testcase_14 AC 110 ms
41,372 KB
testcase_15 AC 117 ms
41,300 KB
testcase_16 AC 118 ms
41,264 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 next) {
		if(next.equals("0"))
			return true;
		return next.matches("[1-9][0-9]*");
	}
}
0