結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー Tsukasa_TypeTsukasa_Type
提出日時 2018-02-11 01:22:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 134 ms / 2,000 ms
コード長 439 bytes
コンパイル時間 2,894 ms
コンパイル使用メモリ 83,600 KB
実行使用メモリ 42,448 KB
最終ジャッジ日時 2024-04-24 13:11:23
合計ジャッジ時間 5,921 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
42,264 KB
testcase_01 AC 122 ms
41,480 KB
testcase_02 AC 126 ms
41,312 KB
testcase_03 AC 129 ms
42,184 KB
testcase_04 AC 134 ms
42,288 KB
testcase_05 AC 128 ms
42,448 KB
testcase_06 AC 132 ms
41,720 KB
testcase_07 AC 123 ms
40,972 KB
testcase_08 AC 131 ms
42,228 KB
testcase_09 AC 130 ms
41,872 KB
testcase_10 AC 128 ms
41,952 KB
testcase_11 AC 130 ms
41,132 KB
testcase_12 AC 128 ms
41,724 KB
testcase_13 AC 131 ms
42,040 KB
testcase_14 AC 127 ms
42,116 KB
testcase_15 AC 130 ms
42,320 KB
testcase_16 AC 131 ms
42,060 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		String a = sc.next();
		String b = sc.next();
		if (judge(a)==true && judge(b)==true) {System.out.println("OK");}
		else {System.out.println("NG");}
	}
	static boolean judge (String s) {
		boolean b = false;
		for (int i=0; i<=12345; i++) {
			if (s.equals(String.valueOf(i))) {b = true;}
		}
		return b;
	}
}
0