結果

問題 No.192 合成数
ユーザー hirata0301hirata0301
提出日時 2023-02-21 11:48:39
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 479 bytes
コンパイル時間 5,640 ms
コンパイル使用メモリ 71,164 KB
実行使用メモリ 56,680 KB
最終ジャッジ日時 2023-09-29 05:37:10
合計ジャッジ時間 7,652 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 115 ms
55,512 KB
testcase_06 AC 110 ms
56,304 KB
testcase_07 AC 116 ms
56,392 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 121 ms
55,800 KB
testcase_11 WA -
testcase_12 AC 114 ms
56,312 KB
testcase_13 WA -
testcase_14 AC 115 ms
55,936 KB
testcase_15 WA -
testcase_16 AC 120 ms
55,832 KB
testcase_17 AC 115 ms
55,512 KB
testcase_18 AC 116 ms
55,776 KB
testcase_19 AC 113 ms
55,904 KB
testcase_20 AC 112 ms
56,100 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 123 ms
55,984 KB
testcase_24 WA -
testcase_25 AC 113 ms
55,880 KB
testcase_26 AC 111 ms
55,956 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int n = N - 100;
        int d = 0;
        if(N % 2 == 0){
            System.out.println(N);
        }
        while(d == 0){
            if(n % 2 == 0&&n!=2){
                System.out.println(n);
                d++;
            }else{
                n++;
            }
        }
    }
}
0