結果

問題 No.276 連続する整数の和(1)
ユーザー hhgfhn1hhgfhn1
提出日時 2018-10-29 16:15:22
言語 Java
(openjdk 23)
結果
AC  
実行時間 136 ms / 1,000 ms
コード長 235 bytes
コンパイル時間 2,125 ms
コンパイル使用メモリ 74,344 KB
実行使用メモリ 54,412 KB
最終ジャッジ日時 2024-11-19 07:42:06
合計ジャッジ時間 4,153 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		System.out.println(n%2==0?n/2:n);
	}
}
0