結果

問題 No.71 そろばん
ユーザー Mcpu3Mcpu3
提出日時 2018-09-07 16:39:06
言語 Java21
(openjdk 21)
結果
AC  
実行時間 120 ms / 5,000 ms
コード長 210 bytes
コンパイル時間 2,205 ms
コンパイル使用メモリ 70,904 KB
実行使用メモリ 56,312 KB
最終ジャッジ日時 2023-08-18 14:36:04
合計ジャッジ時間 5,848 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,512 KB
testcase_01 AC 119 ms
55,708 KB
testcase_02 AC 119 ms
55,768 KB
testcase_03 AC 119 ms
55,548 KB
testcase_04 AC 118 ms
55,728 KB
testcase_05 AC 119 ms
56,044 KB
testcase_06 AC 118 ms
55,664 KB
testcase_07 AC 118 ms
55,752 KB
testcase_08 AC 119 ms
55,664 KB
testcase_09 AC 119 ms
55,676 KB
testcase_10 AC 120 ms
55,760 KB
testcase_11 AC 119 ms
55,928 KB
testcase_12 AC 120 ms
55,936 KB
testcase_13 AC 120 ms
55,516 KB
testcase_14 AC 119 ms
55,808 KB
testcase_15 AC 120 ms
55,796 KB
testcase_16 AC 119 ms
55,752 KB
testcase_17 AC 119 ms
56,312 KB
testcase_18 AC 119 ms
56,036 KB
testcase_19 AC 120 ms
55,672 KB
testcase_20 AC 120 ms
55,932 KB
testcase_21 AC 119 ms
55,672 KB
testcase_22 AC 119 ms
55,728 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main{
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		long n=sc.nextLong();
		sc.close();
		System.out.print((n+1)/2*(n/2+1)+n/2);
	}
}
0