結果

問題 No.111 あばばばば
ユーザー Mcpu3Mcpu3
提出日時 2018-07-20 22:24:50
言語 Java21
(openjdk 21)
結果
AC  
実行時間 458 ms / 5,000 ms
コード長 223 bytes
コンパイル時間 1,967 ms
コンパイル使用メモリ 71,676 KB
実行使用メモリ 56,148 KB
最終ジャッジ日時 2023-08-27 00:20:34
合計ジャッジ時間 4,578 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,716 KB
testcase_01 AC 120 ms
55,824 KB
testcase_02 AC 123 ms
55,676 KB
testcase_03 AC 458 ms
55,864 KB
testcase_04 AC 120 ms
55,948 KB
testcase_05 AC 126 ms
55,460 KB
testcase_06 AC 124 ms
56,148 KB
testcase_07 AC 155 ms
55,364 KB
testcase_08 AC 281 ms
55,980 KB
testcase_09 AC 120 ms
55,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main{
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		int l=stdIn.nextInt(),i;
		long s=1;
		for(i=3;i<l;i+=2) s+=i;
		System.out.print(s);
	}
}
0