結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー matsuyoshi30matsuyoshi30
提出日時 2017-03-08 22:41:22
言語 Java21
(openjdk 21)
結果
AC  
実行時間 155 ms / 2,000 ms
コード長 627 bytes
コンパイル時間 2,141 ms
コンパイル使用メモリ 73,004 KB
実行使用メモリ 56,424 KB
最終ジャッジ日時 2023-09-06 00:32:37
合計ジャッジ時間 5,573 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 144 ms
56,076 KB
testcase_01 AC 146 ms
55,980 KB
testcase_02 AC 143 ms
56,080 KB
testcase_03 AC 146 ms
56,248 KB
testcase_04 AC 143 ms
56,196 KB
testcase_05 AC 144 ms
56,232 KB
testcase_06 AC 141 ms
56,272 KB
testcase_07 AC 142 ms
55,976 KB
testcase_08 AC 144 ms
56,308 KB
testcase_09 AC 142 ms
56,040 KB
testcase_10 AC 145 ms
56,136 KB
testcase_11 AC 145 ms
56,424 KB
testcase_12 AC 141 ms
55,924 KB
testcase_13 AC 143 ms
56,388 KB
testcase_14 AC 155 ms
55,852 KB
testcase_15 AC 144 ms
56,100 KB
testcase_16 AC 143 ms
55,932 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;

class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);

        String a = in.next();
        String b = in.next();

        boolean isA = false;
        boolean isB = false;

        for(int i=0; i<=12345; i++) {
            String str = String.valueOf(i);
            if(a.equals(str)) isA = true;
            if(b.equals(str)) isB = true;
        }

        if(isA && isB) System.out.println("OK");
        else System.out.println("NG");

        in.close();
    }
}
0