結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 104 ms
40,992 KB
testcase_01 AC 106 ms
41,284 KB
testcase_02 AC 105 ms
40,960 KB
testcase_03 AC 109 ms
40,660 KB
testcase_04 AC 93 ms
39,740 KB
testcase_05 AC 107 ms
40,916 KB
testcase_06 WA -
testcase_07 AC 109 ms
41,036 KB
testcase_08 WA -
testcase_09 AC 115 ms
40,876 KB
testcase_10 AC 107 ms
41,108 KB
testcase_11 AC 111 ms
41,352 KB
testcase_12 AC 92 ms
40,040 KB
testcase_13 AC 98 ms
40,092 KB
testcase_14 AC 113 ms
41,140 KB
testcase_15 AC 100 ms
40,368 KB
testcase_16 AC 112 ms
41,468 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