結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー samplelpmassamplelpmas
提出日時 2017-01-18 12:37:37
言語 Java21
(openjdk 21)
結果
AC  
実行時間 146 ms / 2,000 ms
コード長 646 bytes
コンパイル時間 1,999 ms
コンパイル使用メモリ 71,488 KB
実行使用メモリ 58,856 KB
最終ジャッジ日時 2023-08-24 16:49:03
合計ジャッジ時間 5,359 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 142 ms
57,860 KB
testcase_01 AC 142 ms
58,856 KB
testcase_02 AC 141 ms
58,140 KB
testcase_03 AC 146 ms
58,492 KB
testcase_04 AC 142 ms
58,120 KB
testcase_05 AC 143 ms
58,120 KB
testcase_06 AC 143 ms
58,348 KB
testcase_07 AC 141 ms
58,240 KB
testcase_08 AC 141 ms
58,276 KB
testcase_09 AC 140 ms
56,020 KB
testcase_10 AC 141 ms
57,968 KB
testcase_11 AC 140 ms
58,384 KB
testcase_12 AC 141 ms
58,540 KB
testcase_13 AC 142 ms
58,140 KB
testcase_14 AC 141 ms
58,516 KB
testcase_15 AC 142 ms
58,588 KB
testcase_16 AC 142 ms
57,872 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        String A = sc.next();
        String B = sc.next();

        boolean isOkA = false;
        boolean isOkB = false;

        for (int i = 0; i <= 12345; i++) {

            if (A.equals(String.valueOf(i))) {
                isOkA = true;
            }

            if (B.equals(String.valueOf(i))) {
                isOkB = true;
            }

        }

        if (isOkA && isOkB) {
            System.out.println("OK");
        } else {
            System.out.println("NG");
        }

    }

}
0