結果

問題 No.815 Are you a traveller ?
ユーザー GodNegotoGodNegoto
提出日時 2019-11-08 15:22:10
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 2,000 ms
コード長 275 bytes
コンパイル時間 3,365 ms
コンパイル使用メモリ 72,040 KB
実行使用メモリ 56,064 KB
最終ジャッジ日時 2023-10-13 03:12:06
合計ジャッジ時間 5,140 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,904 KB
testcase_01 AC 126 ms
55,724 KB
testcase_02 AC 127 ms
55,676 KB
testcase_03 AC 126 ms
55,764 KB
testcase_04 AC 127 ms
53,600 KB
testcase_05 AC 129 ms
56,064 KB
testcase_06 AC 128 ms
56,064 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package algo;

import java.util.Scanner;

public class sample7 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		if(N % 2 == 0) {
			System.out.println(N / 2);
		}
		else {
			System.out.println(N / 2 + 1);
		}
	}
}
0