結果

問題 No.111 あばばばば
ユーザー matsuyoshi30
提出日時 2016-02-05 20:25:47
言語 Java
(openjdk 23)
結果
AC  
実行時間 503 ms / 5,000 ms
コード長 263 bytes
コンパイル時間 2,800 ms
コンパイル使用メモリ 73,820 KB
実行使用メモリ 41,332 KB
最終ジャッジ日時 2024-09-21 20:40:23
合計ジャッジ時間 4,836 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Test {
	public static void main(String[] args) throws Exception {
		Scanner in = new Scanner(System.in);
		int l = in.nextInt();

		long ans = 0;
		for(int i=2; i<l; i+=2) {
			ans += (l - i);
		}

		System.out.println(ans);
	}
}
0