結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー nullzinenullzine
提出日時 2017-01-13 18:03:02
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 739 bytes
コンパイル時間 2,339 ms
コンパイル使用メモリ 72,112 KB
実行使用メモリ 58,064 KB
最終ジャッジ日時 2023-08-23 10:04:25
合計ジャッジ時間 5,592 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,920 KB
testcase_01 AC 121 ms
55,912 KB
testcase_02 AC 123 ms
55,832 KB
testcase_03 AC 121 ms
56,100 KB
testcase_04 AC 122 ms
56,076 KB
testcase_05 AC 123 ms
55,928 KB
testcase_06 WA -
testcase_07 AC 122 ms
56,180 KB
testcase_08 WA -
testcase_09 AC 120 ms
55,288 KB
testcase_10 AC 119 ms
55,848 KB
testcase_11 AC 121 ms
55,928 KB
testcase_12 AC 122 ms
55,764 KB
testcase_13 AC 125 ms
55,800 KB
testcase_14 AC 123 ms
55,900 KB
testcase_15 AC 122 ms
55,964 KB
testcase_16 AC 123 ms
55,708 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

/**
 * Created by nullzine on 2017/01/13.
 */
public class Main {

    public static void main(String[] args){
        System.out.println(new Main().run());
    }

    private String run(){
        Scanner sc = new Scanner(System.in);
        int aa,bb;
        String a,b;
        a = sc.nextLine();
        b = sc.nextLine();
        if(zeroValidation(a)||zeroValidation(b)){
            return "NG";
        }
        try{
            aa=Integer.parseInt(a);
            bb=Integer.parseInt(b);
        }catch(NumberFormatException e){
            return "NG";
        }
        return "OK";
    }

    private boolean zeroValidation(String str){
        return !str.equals("0")&&str.charAt(0)=='0';
    }

}
0