結果

問題 No.192 合成数
ユーザー yagi2yagi2
提出日時 2017-04-21 16:51:20
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 2,000 ms
コード長 288 bytes
コンパイル時間 2,015 ms
コンパイル使用メモリ 72,112 KB
実行使用メモリ 57,488 KB
最終ジャッジ日時 2023-09-09 09:05:08
合計ジャッジ時間 6,908 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,960 KB
testcase_01 AC 119 ms
56,048 KB
testcase_02 AC 118 ms
55,820 KB
testcase_03 AC 118 ms
55,616 KB
testcase_04 AC 120 ms
56,320 KB
testcase_05 AC 122 ms
55,932 KB
testcase_06 AC 118 ms
56,008 KB
testcase_07 AC 120 ms
55,948 KB
testcase_08 AC 118 ms
55,916 KB
testcase_09 AC 120 ms
57,488 KB
testcase_10 AC 120 ms
53,876 KB
testcase_11 AC 119 ms
56,236 KB
testcase_12 AC 119 ms
55,984 KB
testcase_13 AC 120 ms
55,292 KB
testcase_14 AC 119 ms
55,744 KB
testcase_15 AC 119 ms
55,804 KB
testcase_16 AC 119 ms
56,012 KB
testcase_17 AC 122 ms
55,712 KB
testcase_18 AC 123 ms
56,228 KB
testcase_19 AC 118 ms
55,424 KB
testcase_20 AC 119 ms
55,468 KB
testcase_21 AC 118 ms
55,244 KB
testcase_22 AC 117 ms
55,764 KB
testcase_23 AC 117 ms
55,496 KB
testcase_24 AC 119 ms
56,088 KB
testcase_25 AC 117 ms
55,476 KB
testcase_26 AC 118 ms
55,620 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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

        int N = Integer.parseInt(sc.next());

        if (N % 2 == 0) System.out.println(N);
        if (N % 2 == 1) System.out.println(N-1);
    }
}
0