結果

問題 No.111 あばばばば
ユーザー matsuyoshi30matsuyoshi30
提出日時 2016-02-05 20:25:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 496 ms / 5,000 ms
コード長 263 bytes
コンパイル時間 2,485 ms
コンパイル使用メモリ 74,532 KB
実行使用メモリ 57,664 KB
最終ジャッジ日時 2023-10-21 19:19:19
合計ジャッジ時間 4,785 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
57,400 KB
testcase_01 AC 133 ms
57,664 KB
testcase_02 AC 115 ms
56,288 KB
testcase_03 AC 496 ms
57,460 KB
testcase_04 AC 124 ms
57,576 KB
testcase_05 AC 125 ms
57,168 KB
testcase_06 AC 122 ms
57,576 KB
testcase_07 AC 161 ms
57,632 KB
testcase_08 AC 302 ms
57,604 KB
testcase_09 AC 126 ms
57,364 KB
権限があれば一括ダウンロードができます

ソースコード

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