結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 115 ms
55,848 KB
testcase_06 AC 115 ms
56,156 KB
testcase_07 AC 115 ms
56,512 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 116 ms
56,176 KB
testcase_11 WA -
testcase_12 AC 116 ms
55,576 KB
testcase_13 WA -
testcase_14 AC 115 ms
55,976 KB
testcase_15 WA -
testcase_16 AC 118 ms
55,964 KB
testcase_17 AC 113 ms
55,968 KB
testcase_18 AC 114 ms
56,104 KB
testcase_19 AC 114 ms
55,896 KB
testcase_20 AC 117 ms
55,868 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 116 ms
55,932 KB
testcase_24 WA -
testcase_25 AC 115 ms
56,132 KB
testcase_26 AC 115 ms
56,168 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