結果

問題 No.1128 Wedding Ceremony
ユーザー xRS43BofaUEZ5gcxRS43BofaUEZ5gc
提出日時 2021-03-04 09:47:31
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 2,000 ms
コード長 271 bytes
コンパイル時間 3,370 ms
コンパイル使用メモリ 74,396 KB
実行使用メモリ 54,352 KB
最終ジャッジ日時 2024-04-15 03:25:39
合計ジャッジ時間 7,007 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
53,872 KB
testcase_01 AC 118 ms
53,904 KB
testcase_02 AC 119 ms
54,136 KB
testcase_03 AC 117 ms
53,888 KB
testcase_04 AC 119 ms
54,160 KB
testcase_05 AC 109 ms
52,744 KB
testcase_06 AC 119 ms
54,176 KB
testcase_07 AC 116 ms
54,216 KB
testcase_08 AC 120 ms
53,884 KB
testcase_09 AC 117 ms
54,028 KB
testcase_10 AC 122 ms
54,172 KB
testcase_11 AC 118 ms
54,300 KB
testcase_12 AC 120 ms
53,996 KB
testcase_13 AC 120 ms
54,352 KB
testcase_14 AC 112 ms
52,992 KB
testcase_15 AC 110 ms
52,760 KB
testcase_16 AC 122 ms
54,156 KB
testcase_17 AC 119 ms
54,184 KB
testcase_18 AC 112 ms
53,232 KB
testcase_19 AC 124 ms
54,136 KB
testcase_20 AC 123 ms
54,132 KB
testcase_21 AC 122 ms
54,140 KB
testcase_22 AC 123 ms
54,080 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class HelloWorld {

	    public static void main(String[] args) throws Exception {

	    	Scanner sc = new Scanner(System.in);
	    	int x = sc.nextInt();
	    	sc.close();

	    	System.out.println(x % 2== 0 ? x + 1 : x);

	    	}



}
0