結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー tsunabittsunabit
提出日時 2019-06-09 17:46:08
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 777 bytes
コンパイル時間 3,906 ms
コンパイル使用メモリ 78,632 KB
実行使用メモリ 54,464 KB
最終ジャッジ日時 2024-04-15 20:08:58
合計ジャッジ時間 6,721 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
39,820 KB
testcase_01 AC 127 ms
40,792 KB
testcase_02 AC 117 ms
39,792 KB
testcase_03 AC 131 ms
41,528 KB
testcase_04 AC 130 ms
41,096 KB
testcase_05 AC 132 ms
40,960 KB
testcase_06 AC 130 ms
41,392 KB
testcase_07 WA -
testcase_08 AC 131 ms
41,100 KB
testcase_09 WA -
testcase_10 AC 134 ms
41,312 KB
testcase_11 AC 136 ms
40,992 KB
testcase_12 AC 145 ms
41,392 KB
testcase_13 AC 141 ms
41,112 KB
testcase_14 AC 139 ms
41,168 KB
testcase_15 AC 133 ms
41,032 KB
testcase_16 AC 132 ms
41,368 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.math.*;

public class No446 {
    public static void main(String[] args) {
        // 標準入力から読み込む際に、Scannerオブジェクトを使う。
        Scanner sc = new Scanner(System.in);
        String a = sc.next(), b = sc.next();
        String atemp = a.replaceAll("\\D", "");
        String btemp = b.replaceAll("\\D", "");
        
        if(a.length() == atemp.length() && b.length() == btemp.length()) {
        	int ai = Integer.parseInt(atemp);
            int bi = Integer.parseInt(btemp);
        	if(ai <= 12345 && bi <= 12345) {
            	System.out.println("OK");
            }else {
            	System.out.println("NG");
            }
        }else {
        	System.out.println("NG");
        }
    }
}
0