結果

問題 No.192 合成数
ユーザー GrenacheGrenache
提出日時 2015-11-03 12:11:19
言語 Java21
(openjdk 21)
結果
AC  
実行時間 120 ms / 2,000 ms
コード長 342 bytes
コンパイル時間 3,630 ms
コンパイル使用メモリ 71,644 KB
実行使用メモリ 56,328 KB
最終ジャッジ日時 2023-09-09 08:43:34
合計ジャッジ時間 8,247 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 112 ms
56,104 KB
testcase_01 AC 110 ms
55,836 KB
testcase_02 AC 114 ms
56,152 KB
testcase_03 AC 116 ms
55,868 KB
testcase_04 AC 113 ms
55,960 KB
testcase_05 AC 113 ms
55,532 KB
testcase_06 AC 118 ms
56,096 KB
testcase_07 AC 118 ms
55,916 KB
testcase_08 AC 116 ms
55,956 KB
testcase_09 AC 114 ms
56,148 KB
testcase_10 AC 114 ms
56,152 KB
testcase_11 AC 117 ms
55,912 KB
testcase_12 AC 116 ms
55,740 KB
testcase_13 AC 113 ms
55,808 KB
testcase_14 AC 112 ms
55,992 KB
testcase_15 AC 117 ms
55,752 KB
testcase_16 AC 112 ms
54,080 KB
testcase_17 AC 112 ms
55,752 KB
testcase_18 AC 115 ms
56,276 KB
testcase_19 AC 113 ms
55,920 KB
testcase_20 AC 114 ms
56,328 KB
testcase_21 AC 112 ms
56,048 KB
testcase_22 AC 113 ms
53,984 KB
testcase_23 AC 120 ms
55,740 KB
testcase_24 AC 114 ms
56,256 KB
testcase_25 AC 112 ms
55,816 KB
testcase_26 AC 111 ms
55,688 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;


public class Main_yukicoder192 {

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

        int n = sc.nextInt();

        if (n % 2 == 0) {
        	System.out.println(n);
        } else {
        	System.out.println(n + 1);
        }
        
        sc.close();
    }
}
0